Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Larry Weiss <lfw@airmail.net>
Subject: Re: How do you release memory back to the kernel in C
Date: 1998/05/20	[thread overview]
Message-ID: <F6488AC821F0E8D2.809788D55DED9DDE.2C8F3AD6807AA785@library-proxy.airnews.net> (raw)
In-Reply-To: 35620a04.2342689789@207.126.101.81


Kaz Kylheku wrote:
> On Tue, 19 May 1998 12:25:42 +0100, Asgar Ali <asgar.ali@citicorp.com> wrote:
> >In DEC Unix (3.x and 4.x) I am finding that "free" does not release
> >memory back to the kernel so that it could be used by other processes.
> 
> See Peter Seebach's Infrequently Asked Questions list:
> 6.9: I have a program which mallocs but then frees a lot of memory,
> but memory usage (as reported by ps) doesn't seem to go back down.
>      You're probably not freeing the memory completely. Try replacing
>      free(foo);
>      with
>
>      free(foo);
>      free(foo);
>      free(foo);
>
>      in case the first free() frees the memory only partially.
> (Unix wizards may recognize the parallel with syncing three times
> before rebooting.)
> 

Kind of reminds me of the old Tony Orlando and Dawn song...which 
itself contains advice equally useful to addressing the question
at hand as this IAQ answer (as expected).

 - Larry Weiss



  reply	other threads:[~1998-05-20  4:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-19  4:00 How do you release memory back to the kernel in C Asgar Ali
1998-05-19  4:00 ` Kaz Kylheku
1998-05-20  4:00   ` Larry Weiss [this message]
1998-05-20  4:00   ` Chris Engebretson
1998-05-20  4:00     ` Serguei Patchkovskii
1998-05-20  4:00       ` Kaz Kylheku
1998-05-20  4:00         ` Larry Weiss
     [not found]         ` <125D9A1BA03D8776.FEF9821DB00860BE.0E4 <895712304snz@genesis.demon.co.uk>
1998-05-21  4:00           ` Chris Engebretson
1998-05-21  4:00           ` Kaz Kylheku
1998-05-21  4:00             ` Larry Weiss
     [not found]           ` <2DECFB7C2125FF12.8D639AF581546583.E29C243161345CFE@library-proxy.airnews.net>
1998-05-22  4:00             ` CoolDoug
1998-05-22  4:00               ` Kaz Kylheku
1998-05-22  4:00               ` Larry Weiss
1998-05-25  4:00             ` Rolf Magnus
1998-05-25  4:00               ` Larry Weiss
1998-05-29  4:00               ` Patrick M.
1998-05-20  4:00       ` Larry Weiss
1998-05-24  4:00     ` Al Bowers
1998-05-21  4:00   ` Asgar Ali
1998-05-21  4:00     ` Kaz Kylheku
1998-05-23  4:00     ` Gerald A. Feldman
1998-05-19  4:00 ` firewind
1998-05-19  4:00 ` Lawrence Kirby
1998-05-21  4:00   ` John Hascall
1998-05-22  4:00     ` Asgar Ali
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox