Author: Robert Hyatt
Date: 08:18:55 06/05/01
Go up one level in this thread
On June 05, 2001 at 10:39:29, Marcus Heidkamp wrote: >On June 05, 2001 at 08:41:07, Wayne Lowrance wrote: > >>What are nenirt leaks >>Thax >>Wayne > >Unless I did a serious mistype: I mean memory leaks. This happens whenever you >allocate memory in your program without explicitly freeing it after usage. The >memory menagement functions think this memory is still needed, so they will not >be allocated for other memory requests. Usually you should free all memory that >is no longer needed, so your program can allocate more dynamically. > >Marcus I'm not sure I follow here. Once he allocates buffers, they are needed until the program terminates. It is a total waste of time to free things just before you terminate as that causes the "free" stuff to be done _twice_. Once by the C library to your virtual memory address space (for the free() calls) and then once by the OS to mark the entire program's physical addresses as "free" when it terminates...
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.