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.

classification
Title: Replace MSVC memory allocator with ptmalloc2
Type: enhancement Stage:
Components: Windows Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: loewis, ned14
Priority: normal Keywords:

Created on 2005-06-07 17:31 by ned14, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg25507 - (view) Author: Niall Douglas (ned14) Date: 2005-06-07 17:31
You can get a port of ptmalloc2 to win32/win64 at http://
www.nedprod.com/programs/Win32/ptmalloc2/. 
ptmalloc2 is very considerably faster than the MSVC 
CRT allocator in small object allocations such as those 
python would frequently make. If one were to replace 
python's allocator with ptmalloc2, one should expect to 
see a sizeable speed increase.

As to my knowledge python extension modules don't 
pass malloced blocks between themselves and the core 
interpreter, there shouldn't be a problem with calling the 
wrong allocator with the wrong block. However if there 
were problems, ptmalloc2 allocated blocks are very 
easily recognisable from MSVC allocated ones and so 
the core interpreter could easily free any kind of allocated 
block. The reverse, unfortunately, is not the case unless 
one forced all python extension modules to use a python 
provided allocator.

msg25508 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-06-15 20:54
Logged In: YES 
user_id=21627

I'm rejecting the idea. There is no proof that there would
indeed be a speed improvement, and I very much doubt such a
claim. Python uses obmalloc for most objects, so malloc
performance is mostly irrelevant.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 42060
2005-06-07 17:31:54ned14create