Memory leak

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Dec 12 15:21:42 UTC 2005


On Sun, Dec 11, 2005 at 12:28:13PM -0500, wildberger-iRg7kjdsKiH3fQ9qLvQP4Q at public.gmane.org wrote:
> Now that I know what a memory leak is, my next question is:
> How does one know that one has a leak and how can one correct it.

You can sometimes use a malloc debug library, which wraps all your
malloc and free calls and keeps counts of everything.  When the program
exists it print out statistics about how much was allocated and how much
was freed and which places the the allocation that wasn't freed.

Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list