[plug] Does linux have a general garbage collector...
John Summerfield
summer at os2.ami.com.au
Thu Dec 23 06:31:16 WST 1999
> Thanks heaps everybody for your replies - it's been something that I've been
> curious about for a while. As a programmer, my programs (while still in
> development) may have the odd memory leak, and was wondering if the ram that
> gets lost can be reclaimed by the system without a reboot - for example, if
> I do several test runs on a program that is still leaking memory, will I
> eventually use up the system's RAM - forcing a reboot. This answers
> basically tell me that this is not a problem for linux (or unix in general).
> Anyone know if it is a problem for an operating system originating in
> Redmond (my gut instincts suggest it is highly likely - but I have no firm
> evidence on that)
I'm perfectly happy with a program that allocates a work area once and
never frees it. It's not a leak in that memory does not dribble away over
time, though if someone called it repeatedly within the one process it
would.
But then if someone uses a program differently from its intended use....
Note that in this case, fork() and exec() would not leak as a new process
gets created each time.
--
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.
More information about the plug
mailing list