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: Jon Grant
Subject: Re: possible memory leak in make 3.81
Date: Mon, 15 Oct 2007 20:12:37 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070103)

Hi there,

Paul Smith wrote on 14/10/07 22:17:
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.

the OS should cover that, but in some case I wonder if there may be a
leak left. Would the DOS version for instance result in lost memory the
OS cannot reallocate? (I'm not a DOS expert to answer that)

I'm confident that running such cleanup code wouldn't add a performance
cost.

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?

Devpartner's boundschecker shows up such heap allocations in its log as
"allocations outstanding on program exit" (or some such similar
description).

BTW, I wonder if you run all the different tests in the testsuite
through valgrind? An automated way of doing that would be really handy I
think.. I did that for a client recently.

Regards, Jon




reply via email to

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