discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSAutoreleasePool does not free all memory


From: David Wetzel
Subject: Re: NSAutoreleasePool does not free all memory
Date: Mon, 30 Apr 2001 11:49:20 +0200

Richard Frith-Macdonald wrote

> Autorelease pool memory is *not* freed (unless the thread they belong to
> is terminated) ... the autorelease pool objects are
> cached for later re-use ... so this memory will remain in use, and will
> stop the whole block of memory being returned to the operqating system.
> 
> This is of course harmless, since the memory will be re-used the next 
> time any
> object is allocated, (so memory usage will not grow indefinately) and if 
> nothing
> ever is allocated again, it will be paged out to disk.

I don't like this strategy. Paging is always slow. It is the operating system's 
task to manage free memory.
Imagine you have multiple GSWeb instances. Each eats 100 MB but would only use 
20 if the memory would be freed. 
You are using swap disk space where you don't have to.

Modern operating system (and I guess Linux is one too in this aspect) should be 
far better optimized than GNUstep.

Maybe I miss something here but...

---
   _  _
 _(_)(_)_  David Wetzel, Turbocat's Development,
(_) __ (_) Buchhorster Strasse 23, D-16567 Muehlenbeck/Berlin, FRG,
  _/  \_   Fax +49 33056 82835 Phone +49 33056 82834
 (______)  http://www.turbocat.de/  address@hidden
           DEVELOPMENT * CONSULTING * ADMINISTRATION




reply via email to

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