bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible memory leak in make 3.81


From: Paul Smith
Subject: Re: possible memory leak in make 3.81
Date: Sun, 14 Oct 2007 17:17:16 -0400

On Sun, 2007-10-14 at 18:33 +0100, Jon Grant wrote:
> Do they get free'd up when make exits?

No.  It's quite difficult to do this since the variables are static and
so are only visible within that function.  In order to free them we'd
have to add them to some kind of global free list that could be walked
when make was exiting.  This will take time when all we want to do is
exit... and anyway, the operating system will take care of cleaning that
up when we exits.

> Would be neater to cleanup any heap allocations, IMHO. Makes it less
> cloudly when tracking other memory-leaks as well.

I don't think this is a real issue; all the tools I've used for this,
including things like Purify as well as free tools like Valgrind, only
count memory as lost if there's nothing pointing to that memory anymore.
Since this memory still has valid pointers to it, it's not a problem.

Are there particular tools that you are thinking of that run into this?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]