Python 2.6 still not giving memory back to the OS...

John Machin sjmachin at
Sun Aug 16 03:01:37 CEST 2009

On Aug 16, 2:41 am, Mark Dickinson <dicki... at> wrote:
> and got the expected memory usage for my Python process, as
> displayed by top:  memory usage went up to nearly 1Gb after
> each assignment to b, then dropped down to 19 Mb or so after
> each 'del b'.  I get similar results under Python 2.5.
> So maybe there's something in xlrd that's hanging on to all
> that memory?

News to me, and news to guppy/heapy v0.1.9 -- unless the new Windows
support has some deficiencies -- after `del b` heapy can't find any
trace of the Book object and its contents.

As far as releasing memory back to the OS is concerned, I have dim
memories of *x systems where free() would return space to the OS if
the block was "large" and it was next to the "break" point ... this
effect could be what you are seeing.

More information about the Python-list mailing list