Binary increased memory ( leaks )

Jim Wilson wilson@tuliptree.org
Thu Jun 12 23:22:00 GMT 2003


Klein, Bernhard wrote:
> Now, I had the problem, that two of my binaries works properly, but if I
> checked the memory with "top" I saw, that the memory usage continous
> increased.

First figure out what kind of memory is being leaked.  Stack?  Malloc? 
mmap?  You should be able to figure this out in gdb by checking the 
stack pointer value and the sbrk(0) value.  If stack, then a gdb 
backtrace should be helpful.  If malloc, a quick check of the FSF GNU 
project pages shows a pointer to a MemWatch program that might be helpful.
	http://www.gnu.org/directory/memwatch.html
See also the list of related programs.

Jim



More information about the Gcc-help mailing list