[Python-Dev] When do sets shrink? (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Thu Dec 29 12:55:02 CET 2005
- Previous message: [Python-Dev] When do sets shrink?
- Next message: [Python-Dev] When do sets shrink?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin v. Löwis wrote:
Adal Chiriliuc wrote: > MSVC 7.1 and 8.0 malloc always uses the Windows heap functions > (HeapAlloc & friends) if running on Windows 2000 or newer > (malloc.c and heapinit.c). > > So it seems that for both Linux (gcc) and Win (msvc) the memory is > released to the operating system.
How so? HeapFree does not return the memory to the system. From http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/heapfunctions.asp "Once the pages are committed, they are not decommitted until the process is terminated or until the heap is destroyed by calling the HeapDestroy function."
http://www.python.org/sf/1389051 agrees with the microsoft documentation. (where imaplib runs out of memory after read- ing 2 megabytes of a 14 megabyte message).
- Previous message: [Python-Dev] When do sets shrink?
- Next message: [Python-Dev] When do sets shrink?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]