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: Eli Zaretskii
Subject: Re: possible memory leak in make 3.81
Date: Mon, 15 Oct 2007 21:42:14 +0200

> Date: Mon, 15 Oct 2007 20:12:37 +0100
> From: Jon Grant <address@hidden>
> Cc: address@hidden
> 
> 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?

No.  Even DOS releases all the memory of a process that exited or was
otherwise terminated.  You can only lose memory on DOS if you happen
to corrupt the system memory chain (by writing to bad addresses), but
in that case you will have a system crash almost instantly anyway.




reply via email to

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