This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients brian.curtin, loewis, neologix, pitrou, tim.golden
Date 2011-11-29.20:48:32
SpamBayes Score 3.085976e-12
Marked as misclassified No
Message-id <>
The patch looks good to me.

To study Microsoft's malloc, see VC\crt\src\malloc.c. Typically, it uses HeapAlloc from the CRT heap, unless it's in 32-bit mode, and __active_heap is either __V6_HEAP or __V5_HEAP. This is determined at startup by __heap_select, inspecting an environment variable __MSVCRT_HEAP_SELECT. If that's not set, the CRT heap is used.

The CRT heap, in turn, is created with HeapCreate (no flags).

As an alternative approach, Python could consider completely dropping obmalloc on Windows, and using a Windows Low Fragementation Heap (LFH) instead, with HEAP_NO_SERIALIZE (as the heap would be protected by the GIL).

If we take the route proposed by this patch, I recommend also dropping all other CRT malloc() calls in Python, and make allocations from the process heap instead (that's a separate issue, though).
Date User Action Args
2011-11-29 20:48:33loewissetrecipients: + loewis, pitrou, tim.golden, brian.curtin, neologix
2011-11-29 20:48:33loewissetmessageid: <>
2011-11-29 20:48:33loewislinkissue13483 messages
2011-11-29 20:48:33loewiscreate