Search Results

Search found 12267 results on 491 pages for 'out of memory'.

Page 108/491 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • stanford pos tagger runs out of memory?

    - by goh
    my stanford tagger ran out of memory. Is it because the text has to be properly formatted? This is because i use it to tag html contents, with the tags stripped, but there may have quite a excessive amount of newlines. here is the error: BlockquoWARNING: Untokenizable: ? (char in decimal: 9829) Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at edu.stanford.nlp.sequences.ExactBestSequenceFinder.bestSequenceNew(Ex actBestSequenceFinder.java:175) at edu.stanford.nlp.sequences.ExactBestSequenceFinder.bestSequence(Exact BestSequenceFinder.java:98) at edu.stanford.nlp.tagger.maxent.TestSentence.runTagInference(TestSente nce.java:277) at edu.stanford.nlp.tagger.maxent.TestSentence.testTagInference(TestSent ence.java:258) at edu.stanford.nlp.tagger.maxent.TestSentence.tagSentence(TestSentence. java:110) at edu.stanford.nlp.tagger.maxent.MaxentTagger.tagSentence(MaxentTagger. java:825) at edu.stanford.nlp.tagger.maxent.MaxentTagger.runTagger(MaxentTagger.ja va:1319) at edu.stanford.nlp.tagger.maxent.MaxentTagger.runTagger(MaxentTagger.ja va:1225) at edu.stanford.nlp.tagger.maxent.MaxentTagger.runTagger(MaxentTagger.ja va:1183) at edu.stanford.nlp.tagger.maxent.MaxentTagger.main(MaxentTagger.java:13 58)

    Read the article

  • There is insufficient system memory to run this query when creating temporary table

    - by phenevo
    StringBuilder query = new StringBuilder(); query.Append("CREATE TABLE #Codes (Code nvarchar(100) collate database_default ) "); query.Append("Insert into #Codes (Code) "); int lengthOfCodesArray = targetCodes.Length; for (int index = 0; index < lengthOfCodesArray; index++) { string targetCode = targetCodes[index]; query.Append("Select N'" + targetCode + "' "); if (index != lengthOfCodesArray - 1) { query.Append("Union All "); } } query.Append("drop table #Codes "); on: cmd.ExecuteReader() I get There is insufficient system memory to run this query when creating temporary table But weird thing is that, when I have 25k codes is ok, when 5k I get this error. Initial size is 262 MB. Lengt of each code is average 15.

    Read the article

  • Problem with room/screen/menu controller in python game: old rooms are not removed from memory

    - by Jordan Magnuson
    I'm literally banging my head against a wall here (as in, yes, physically, at my current location, I am damaging my cranium). Basically, I've got a Python/Pygame game with some typical game "rooms", or "screens." EG title screen, high scores screen, and the actual game room. Something bad is happening when I switch between rooms: the old room (and its various items) are not removed from memory, or from my event listener. Not only that, but every time I go back to a certain room, my number of event listeners increases, as well as the RAM being consumed! (So if I go back and forth between the title screen and the "game room", for instance, the number of event listeners and the memory usage just keep going up and up. The main issue is that all the event listeners start to add up and really drain the CPU. I'm new to Python, and don't know if I'm doing something obviously wrong here, or what. I will love you so much if you can help me with this! Below is the relevant source code. Complete source code at http://www.necessarygames.com/my_games/betraveled/betraveled_src0328.zip MAIN.PY class RoomController(object): """Controls which room is currently active (eg Title Screen)""" def __init__(self, screen, ev_manager): self.room = None self.screen = screen self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.room = self.set_room(config.room) def set_room(self, room_const): #Unregister old room from ev_manager if self.room: self.room.ev_manager.unregister_listener(self.room) self.room = None #Set new room based on const if room_const == config.TITLE_SCREEN: return rooms.TitleScreen(self.screen, self.ev_manager) elif room_const == config.GAME_MODE_ROOM: return rooms.GameModeRoom(self.screen, self.ev_manager) elif room_const == config.GAME_ROOM: return rooms.GameRoom(self.screen, self.ev_manager) elif room_const == config.HIGH_SCORES_ROOM: return rooms.HighScoresRoom(self.screen, self.ev_manager) def notify(self, event): if isinstance(event, ChangeRoomRequest): if event.game_mode: config.game_mode = event.game_mode self.room = self.set_room(event.new_room) #Run game def main(): pygame.init() screen = pygame.display.set_mode(config.screen_size) ev_manager = EventManager() spinner = CPUSpinnerController(ev_manager) room_controller = RoomController(screen, ev_manager) pygame_event_controller = PyGameEventController(ev_manager) spinner.run() EVENT_MANAGER.PY class EventManager: #This object is responsible for coordinating most communication #between the Model, View, and Controller. def __init__(self): from weakref import WeakKeyDictionary self.last_listeners = {} self.listeners = WeakKeyDictionary() self.eventQueue= [] self.gui_app = None #---------------------------------------------------------------------- def register_listener(self, listener): self.listeners[listener] = 1 #---------------------------------------------------------------------- def unregister_listener(self, listener): if listener in self.listeners: del self.listeners[listener] #---------------------------------------------------------------------- def clear(self): del self.listeners[:] #---------------------------------------------------------------------- def post(self, event): # if isinstance(event, MouseButtonLeftEvent): # debug(event.name) #NOTE: copying the list like this before iterating over it, EVERY tick, is highly inefficient, #but currently has to be done because of how new listeners are added to the queue while it is running #(eg when popping cards from a deck). Should be changed. See: http://dr0id.homepage.bluewin.ch/pygame_tutorial08.html #and search for "Watch the iteration" print 'Number of listeners: ' + str(len(self.listeners)) for listener in list(self.listeners): #NOTE: If the weakref has died, it will be #automatically removed, so we don't have #to worry about it. listener.notify(event) def notify(self, event): pass #------------------------------------------------------------------------------ class PyGameEventController: """...""" def __init__(self, ev_manager): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.input_freeze = False #---------------------------------------------------------------------- def notify(self, incoming_event): if isinstance(incoming_event, UserInputFreeze): self.input_freeze = True elif isinstance(incoming_event, UserInputUnFreeze): self.input_freeze = False elif isinstance(incoming_event, TickEvent) or isinstance(incoming_event, BoardCreationTick): #Share some time with other processes, so we don't hog the cpu pygame.time.wait(5) #Handle Pygame Events for event in pygame.event.get(): #If this event manager has an associated PGU GUI app, notify it of the event if self.ev_manager.gui_app: self.ev_manager.gui_app.event(event) #Standard event handling for everything else ev = None if event.type == QUIT: ev = QuitEvent() elif event.type == pygame.MOUSEBUTTONDOWN and not self.input_freeze: if event.button == 1: #Button 1 pos = pygame.mouse.get_pos() ev = MouseButtonLeftEvent(pos) elif event.type == pygame.MOUSEBUTTONDOWN and not self.input_freeze: if event.button == 2: #Button 2 pos = pygame.mouse.get_pos() ev = MouseButtonRightEvent(pos) elif event.type == pygame.MOUSEBUTTONUP and not self.input_freeze: if event.button == 2: #Button 2 Release pos = pygame.mouse.get_pos() ev = MouseButtonRightReleaseEvent(pos) elif event.type == pygame.MOUSEMOTION: pos = pygame.mouse.get_pos() ev = MouseMoveEvent(pos) #Post event to event manager if ev: self.ev_manager.post(ev) # elif isinstance(event, BoardCreationTick): # #Share some time with other processes, so we don't hog the cpu # pygame.time.wait(5) # # #If this event manager has an associated PGU GUI app, notify it of the event # if self.ev_manager.gui_app: # self.ev_manager.gui_app.event(event) #------------------------------------------------------------------------------ class CPUSpinnerController: def __init__(self, ev_manager): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.clock = pygame.time.Clock() self.cumu_time = 0 self.keep_going = True #---------------------------------------------------------------------- def run(self): if not self.keep_going: raise Exception('dead spinner') while self.keep_going: time_passed = self.clock.tick() fps = self.clock.get_fps() self.cumu_time += time_passed self.ev_manager.post(TickEvent(time_passed, fps)) if self.cumu_time >= 1000: self.cumu_time = 0 self.ev_manager.post(SecondEvent(fps=fps)) pygame.quit() #---------------------------------------------------------------------- def notify(self, event): if isinstance(event, QuitEvent): #this will stop the while loop from running self.keep_going = False EXAMPLE CLASS USING EVENT MANAGER class Timer(object): def __init__(self, ev_manager, time_left): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.time_left = time_left self.paused = False def __repr__(self): return str(self.time_left) def pause(self): self.paused = True def unpause(self): self.paused = False def notify(self, event): #Pause Event if isinstance(event, Pause): self.pause() #Unpause Event elif isinstance(event, Unpause): self.unpause() #Second Event elif isinstance(event, SecondEvent): if not self.paused: self.time_left -= 1

    Read the article

  • SQL Server CE - Internal error: Cannot open the shared memory region

    - by blu
    I have a SQL Server CE database that works fine in dev, but when installed on the client has an issue. The SQL Server CE 3.5 dependencies are copied as part of the deployment. The target machine is a clean Windows 7 32-bit Ultimate image. The message for the exception in the event log is: Internal error: Cannot open the shared memory region. It looks like this is SSCE_M_CANTOPENSHAREDMEMORY and the site says there isn't a connection string value to change this and that these issues are typically not resolvable by the end developers. Has anyone run into this, and if so were you able to resolve this issue?

    Read the article

  • Accessing one process's memory contents from another module

    - by Fangkai Yang
    I am developing a virtual device driver such that the user can write to the driver a process' pid and a virtual address, and the module will use these two values to get the memory contents of the target process. I am wondering if there is any easy functions that can fetch user page's data at this virtual address. I have tried get_user but this is not possible because the modules executing get_user at another process's context. I also tried to use ptrace_readdata, however, it seems that the file at /kernel/ptrace.c leaves a function access_process_vm undefined and also I don't know how to compile the source code of my module with this file (the linker seaches file in /linux/include by default). I am wondering if there are any other solutions...

    Read the article

  • Use a System.Drawing.Printing.PrintDocument to generate a PDF in memory

    - by MarkB29
    Does anyone know if the following is possible and if so what the best way of doing it is for free? I am generating a PrintDocument in a project I am currently working on and displaying a print dialog box so a user can choose which printer they want to use etc. The is currently a windows form application and if a user wants to print to a PDF they can select to print to CutePDF or something similar. However I am now putting a ASP.Net web frontend on the application and want to use the same code to generate the PrintDocument but want to print it to a PDF on the fly and serve it up via the Response stream in the format of a PDF download. So my question is....How can I use the current PrintDocument and generate a PDF in memory from it?? Thanks

    Read the article

  • Out of memory with multi images in one picturebox

    - by Nikom
    Hi, ive problem with out of memory when im trying load few images into one picturebox. Pls Help :) public void button2_Click(object sender, EventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.ShowDialog(); string selected = dialog.SelectedPath; string[] imageFileList = Directory.GetFiles(selected); int iCtr = 0,zCtr = 0; foreach(string imageFile in imageFileList) { if (Image.FromFile(imageFile) != null) { Image.FromFile(imageFile).Dispose(); } PictureBox eachPictureBox = new PictureBox(); eachPictureBox.Size = new Size(100,100); // if (iCtr % 8 == 0) //{ // zCtr++; // iCtr = 0; //} eachPictureBox.Location = new Point(iCtr * 100 + 1, 1); eachPictureBox.Image = Image.FromFile(imageFile); iCtr++; panel1.Controls.Add(eachPictureBox); } }`enter code here`

    Read the article

  • ASN1 out of memory. during a signedCMS.decode

    - by JL
    I am having a problem using the signedCMS.decode routine. See the code below. The error seems to occur when the file size is too big in this case 11MB. private static void RemoveZfoSignature(string zfoFileName) { byte[] fileContents = File.ReadAllBytes(zfoFileName); var contentInfo = new ContentInfo(fileContents); var signedCms = new SignedCms(contentInfo); // This line throws the error 100% of the time signedCms.Decode(fileContents); signedCms.RemoveSignature(0); byte[] outfile = signedCms.ContentInfo.Content; string outFileName = zfoFileName.Replace(".zfo", "_tmp.zfo"); File.WriteAllBytes(outFileName, outfile); } Here is the exact error: "System.Security.Cryptography.CryptographicException: ASN1 out of memory. at System.Security.Cryptography.Pkcs.SignedCms.OpenToDecode(Byte[] encodedMessage, ContentInfo contentInfo, Boolean detached) at System.Security.Cryptography.Pkcs.SignedCms.Decode(Byte[] encodedMessage) at ConsoleApplication2.Program.RemoveZfoSignature(String zfoFileName) in C:\\Users\\\\Documents\\Visual Studio 2008\\Projects\\ConsoleApplication2\\ConsoleApplication2\\Program.cs:line 30" Any idea on how to fix this?

    Read the article

  • SQLSTATE[HY000]: General error: 5 Out of memory (Needed 4194092 bytes)

    - by Jon Reeks
    Hi I'm receiving the following error on my shared hosting box: SQLSTATE[HY000]: General error: 5 Out of memory (Needed 4194092 bytes) This error is only triggered on a specific page. I guess this indicates that I am reaching the upper limit of the 64MB allocated to me in my current MySQL environment. Does this mean that a single query is going over (returning) 64MB of data? If so, i guess i can just track down and tune that specific query? Or isnt that the correct approach? Thanks Jon

    Read the article

  • How can I exceed the 60% Memory Limit of IIS7 in ASP.NET Caching application

    - by evilknot
    Pardon if this is more serverfault vs. stackoverflow. It seems to be on the border. We have an application that caches a large amount of product data for an e-commerce application using ASP.NET caching. This is a dictionary object with 65K elements, and our calculations put the object's size at ~10GB. Problem: The amount of memory the object consumes seems to be far in excess of our 10GB calculation. BIGGEST CONCERN: We can't seem to use over 60% of the 32GB in the server. What we've tried so far: In machine.config/system.web (sf doesn't allow the tags, pardon the formatting): processModel autoConfig="true" memoryLimit="80" In web.config/system.web/caching/cache (sf doesn't allow the tags, pardon the formatting): privateBytesLimit = "20000000000" (and 0, the default of course) percentagePhysicalMemoryUsedLimit = "90" Environment: Windows 2008R2 x64 32GB RAM IIS7 Nothing seems to allow us to exceed the 60% value. See screenshot of taskman. http://www.freeimagehosting.net/image.php?7a42144e03.jpg

    Read the article

  • Memory leak in WPF app due to DelegateCommand.

    - by Abdullah BaMusa
    I just finished desktop apps written in WPF and c# using MVVM pattern. In this app I used Delegate Command implementation to wrap the ICommands properties exposed in my ModelView. The problem is these DelegateCommands prevent my ModelView and View from being garbage collected after closing the view. So it stays larking until I terminate the whole application. I profile the application I find it’s all about delegatecommand that keeping the modelview in memory. How could I avoid this situation and is this in nature of mvvm pattern, or it’s about my implantation of the pattern?. Thanks

    Read the article

  • Why Do Browsers Leak Memory?

    - by Dane Balia
    A colleague and I were speaking about browsers (using browser control in a project), and it appears as plain as day that all browsers (Firefox, Chrome, IE, Opera) display the same characteristic or side-effect from their usage and that being 'Leaking Memory'. Can someone explain why that is the case? Surely as with any form of code, there should be proper garbage collection? PS. I've read about some defensive patterns on why this can happen from a developer's perspective. I am aware of an article Crockford wrote on IE; but why is the problem symptomatic of every browser? Thanks

    Read the article

  • iPhone app memory leak

    - by Marian Busoi
    Any idea why this code gives me a memory leak? As you can see, I'm running out of ideas as to what I can do to stop it. (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; NSArray *allSketches = [project.sketches allObjects]; NSMutableArray *temp = [[NSMutableArray alloc] initWithArray:allSketches]; if(sketchesArray != nil) [sketchesArray release]; [self setSketchesArray:temp]; [allSketches release]; allSketches = nil; [temp release]; temp = nil; } I also release sketchesArray inside viewDidDissapear. I'm not using viewDidLoad and dealloc to init/release these objects as what I am doing requires me to use viewWillAppear and viewDidDissapear. Thanks

    Read the article

  • Sharing memory among YACC, Lex, and C files

    - by sczizzo
    I have a YACC (Bison) grammar, a Lex (Flex) tokenizer, and a C program among which I need to share a struct (or really any variable). Currently, I declare the actual object in the grammar file and extern it wherever I need it (which is to say, my C source file), usually using a pointer to manipulate it. I have a shared header (and implementation) file between the C file and the grammar file with functions useful for manipulating my data structure. This works, but it feels a little uncomfortable. Is there a better way to share memory between the grammar and program?

    Read the article

  • Perfmon on Vista to monitor .Net CLR memory for dutch dummies

    - by Dabblernl
    OK... My managed .Net program is eating memory leading it to crash after a few hours with a OutOfMemoryException. I want to investigate this starting with using perfmon.exe. I found a description on how to do this here However, I have a dutch Vista and the terms used differ widely from the ones used in this blog and I find myself simply unable to set it up. Can someone point me the way by stating "first from the top,second from the left" how to set up a performance monitor for my .Net program?

    Read the article

  • Memory efficient import many data files into panda DataFrame in Python

    - by richardh
    I import into a panda DataFrame a directory of |-delimited.dat files. The following code works, but I eventually run out of RAM with a MemoryError:. import pandas as pd import glob temp = [] dataDir = 'C:/users/richard/research/data/edgar/masterfiles' for dataFile in glob.glob(dataDir + '/master_*.dat'): print dataFile temp.append(pd.read_table(dataFile, delimiter='|', header=0)) masterAll = pd.concat(temp) Is there a more memory efficient approach? Or should I go whole hog to a database? (I will move to a database eventually, but I am baby stepping my move to pandas.) Thanks! FWIW, here is the head of an example .dat file: cik|cname|ftype|date|fileloc 1000032|BINCH JAMES G|4|2011-03-08|edgar/data/1000032/0001181431-11-016512.txt 1000045|NICHOLAS FINANCIAL INC|10-Q|2011-02-11|edgar/data/1000045/0001193125-11-031933.txt 1000045|NICHOLAS FINANCIAL INC|8-K|2011-01-11|edgar/data/1000045/0001193125-11-005531.txt 1000045|NICHOLAS FINANCIAL INC|8-K|2011-01-27|edgar/data/1000045/0001193125-11-015631.txt 1000045|NICHOLAS FINANCIAL INC|SC 13G/A|2011-02-14|edgar/data/1000045/0000929638-11-00151.txt

    Read the article

  • Allocate constant memory

    - by Vlad
    I'm trying to set my simulation params in constant memory but without luck (CUDA.NET). cudaMemcpyToSymbol function returns cudaErrorInvalidSymbol. The first parameter in cudaMemcpyToSymbol is string... Is it symbol name? actualy I don't understand how it could be resolved. Any help appreciated. //init, load .cubin float[] arr = new float[1]; arr[0] = 0.0f; int size = Marshal.SizeOf(arr[0]) * arr.Length; IntPtr ptr = Marshal.AllocHGlobal(size); Marshal.Copy(arr, 0, ptr, arr.Length); var error = CUDARuntime.cudaMemcpyToSymbol("param", ptr, 4, 0, cudaMemcpyKind.cudaMemcpyHostToDevice); my .cu file contain __constant__ float param;

    Read the article

  • Which is the most memory leak safe approach.

    - by MattC
    I have a table of frequently updated information. This is presented using a container div with a div for each row, each row containing 10 divs. I am using setInterval to call a an asmx webservice that returns some json formatted information. On the success callback I call $("#myContainer").empty(); on the container div and recreate the rows and 10 nested divs for each row's columns. This page may be left to run for a whole day, so I am wary of updating the DOM like this as I have noticed that memory does rise for the browser over time (IE8). The other approach I am considering is to add an idea to the row div. When new results process each item of data, look for the corresponding row, if it exists overwrite the data in each div. If it doesn't exist (new data for example), append the row. What approaches have others used for this sort of long lived pseudo realtime information display. TIA

    Read the article

  • Python In-memory table

    - by nsharish
    What is the right way to forming in-memory table in python with direct lookups for rows and columns.I thought of using dict of dicts this way, class Table(dict): def __getitem__(self, key): if key not in self: self[key]={} return dict.__getitem__(self, key) table = Table() table['row1']['column1'] = 'value11' table['row1']['column2'] = 'value12' table['row2']['column1'] = 'value21' table['row2']['column2'] = 'value22' >>>table {'row1':{'column1':'value11','column2':'value12'},'row2':{'column1':'value21','column2':'value22'}} I had difficulty in looking up for values in columns. >>>'row1' in table True >>>'value11' in table['row1'].values() True Now how do I do lookup if 'column1' has 'value11' Is this method of forming tables wrong?Is there a better way to implement such tables with easier lookups?.Thanks

    Read the article

  • How do you implement Software Transactional Memory?

    - by Joseph Garvin
    In terms of actual low level atomic instructions and memory fences (I assume they're used), how do you implement STM? The part that's mysterious to me is that given some arbitrary chunk of code, you need a way to go back afterward and determine if the values used in each step were valid. How do you do that, and how do you do it efficiently? This would also seem to suggest that just like any other 'locking' solution you want to keep your critical sections as small as possible (to decrease the probability of a conflict), am I right? Also, can STM simply detect "another thread entered this area while the computation was executing, therefore the computation is invalid" or can it actually detect whether clobbered values were used (and thus by luck sometimes two threads may execute the same critical section simultaneously without need for rollback)?

    Read the article

  • phpDocumentor alternative consuming less memory

    - by Michal Cihar
    Okay, I'm fed up with phpDocumentator. It consumes way much more memory and time than I'm willing to give it. Does there exist some really compatible program to generate documentation for PHP code? I've tried PHPDoctor, which looks nice, but it has some missing features. I've also tried PhpDocGen, but it just bails out with some Perl errors, which I'm too lazy to study. Doxygen also does not seem to play well with our sources. PS: The documentation would be for phpMyAdmin, a little bit outdated documentation is here.

    Read the article

  • Out of Memory When Loading Java Entities

    - by Hugh Buchanan
    I have a terrible problem that hopefully has a very simple answer. I am running out of memory when I perform a basic If I have code like this: MyEntity myEntity; for (Object id: someIdList) { myEntity = find(id); // do something basic with myEntity } And the find() method is a standard EntityManager related method: public MyEntity find(Object id) { return em.find(mycorp.ejb.entity.MyEntity.class, id); } This code worked a couple of weeks ago, and works fine if there are fewer items in the database. The resulting error I am facing is: java.lang.OutOfMemoryError: GC overhead limit exceeded The exception is coming from oracle toplink calling some oracle jdbc methods. The loop exists because an EJBQL such as "select object(o) from MyEntity as o" will overload the application server when there are lots of records.

    Read the article

  • remove ViewController from memory

    - by user262325
    hello everyone I hope to load an ViewController and do something then unload it from memory. if (self.vViewController5.view.superview==nil) { ViewController5 *blueController = [[ViewController5 alloc] initWithNibName:@"View5" bundle:nil]; self.vViewController5 = blueController; [self.vViewController5 setDelegate:self]; [blueController release]; } [self presentModalViewController:vViewController5 animated:YES]; later, call [self dismissModalViewControllerAnimated:YES]; but I found that dismissModalViewControllerAnimated does not trigger the event viewDidUnload of Viewcontroller5. I try function release but it caused program collapse. I also try removeFromSuperView but it does not trigger the event ViewDidUnload neither. Welcome any comment Thanks interdev

    Read the article

  • Bitmapdata heavy usage - memory disaster (spark/FB4)

    - by keyle
    I've got a flex component which works pretty well but unfortunately turns into a disaster once used in a datagroup item renderer of about 40-50 items. Essentially it uses bitmapdata to take screenshot of a fully-rendered webpage in mx:HTML (this version of webkit rocks btw, miles better than flex 3). The code is pretty self-explanatory I think. http://noben.org/show/PageGrabber.mxml I've optimized it all I could, browsed, search for answers and already trimmed it down a lot, I'm desparate to reduce the memory usage (about 600mb after 100 draw) The Garbage collector has little effect. Thanks! Nic

    Read the article

  • Logging Mechanism using memory mapping technique

    - by Tushar
    Just create a mapping of the file of the required size (CreateFileMapping or mmap), write the lines in the buffer and start over when the maximum number is reached. -- Your answer for write-a-circular-file-in-c. I am also writing the LogWriter module. In this caase i am mapping the whole file to the memory using mmap(). I am maintaining the Read and Write pointers.I want to write the log to the file in append mode. Then when logger service is started first time it writes it appends the logs. But when system gets shutdown next time when i run the service it doesn't append the data at the end. I want to maintain the write and read offsets even if system shut down.How to achieve this ..? How to find the how much data is written to the log file. ??

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >