Memory usage, in droves

David Bolen db3l at fitlinxx.com
Wed Aug 1 15:30:41 EDT 2001


"Danyel Fisher" <danyelf at ics.uci.edu> writes:

> Now I'm sort of curious, though. Is there a way for a program to return some
> space to the system? I'm concerned that if I swell to 79% again in the
> presence of heavy traffic, all the gc in the world won't shrink me below
> that value. Or is this a FAQ somewhere?

That's pretty much up to the underlying VM implementation.  In
general, most systems won't actually take back memory from the virtual
memory space of your process until the process exits.  WinNT (and
maybe 2K) do seem to do this under some conditions but not all.

But as long as you have the virtual memory (and paging space) then you
should be fine once you stop using that memory, since at worst it'll
tie up some paging space but the OS should throw it out of physical
memory reasonably quickly.  So while your maximum VM will appear to
stay large, your working set should reduce nicely.  At least until you
surge again.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list