[issue26251] Use "Low-fragmentation Heap" memory allocator on Windows

Steve Dower report at bugs.python.org
Wed Jun 28 15:11:58 EDT 2017


Steve Dower added the comment:

We tried it at one point, but it made very little difference because we don't use the Windows heap for most allocations. IIRC, replacing Python's optimised allocator with the LFH was a slight performance regression, but I'm not sure the benchmarks were reliable enough back then to be trusted. I'm also not sure what optimisations have been performed in Windows 8/10.

Since the LFH is the default though, it really should just be a case of replacing Py_Malloc with a simple HeapAlloc shim and testing it. The APIs are nearly the same (the result of GetProcessHeap() will be stable for the lifetime of the process, and there's little value in creating specific heaps unless you intend to destroy it rather than free each allocation individually).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26251>
_______________________________________


More information about the Python-bugs-list mailing list