Reclaiming (lots of) memory

Luis P Caamano lcaamano at gmail.com
Fri Oct 22 09:18:17 EDT 2004


"James Kew" <james.kew at btinternet.com> wrote in message news:<2sgm8oF1kjn75U1 at uni-berlin.de>...
> "Thomas Rast" <foo.bar at freesurf.ch.invalid> wrote in message 
> news:87pt3y44la.fsf at thomas.local...
> > Just to clear this up, the problem isn't that the process takes too
> > much memory while initializing.  [...]
> > The problem was that it wouldn't free *unused* RAM after
> > initialization.
> 
> Is this really a problem though, if the process is long-running after 
> initialisation? If the pages are unused after initialisation, won't they 
> eventually get swapped out to disk making the physical RAM available 
> elsewhere?
> 


Why swap out 60MB of "unused" memory???  That's a waste of CPU cycles
and disk space.

What if you wanted to run his program on a machine with 128MB of RAM
and NO swap or extremely slow swap.  If it freed the memory it would
run nicely with other apps, if it doesn't return the memory to the OS,
it might crash if the system needs to swap or the app might fail if
everything slows down too much while swapping those 60MB of unused
memory.

--
Luis P Caamano



More information about the Python-list mailing list