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 vstinner
Recipients rhettinger, serhiy.storchaka, vstinner
Date 2015-09-17.12:58:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1442494715.17.0.135663945739.issue25135@psf.upfronthosting.co.za>
In-reply-to
Content
"Does PyMem_Malloc() do anything other than call malloc()?  We hold the GIL so there doesn't seem to be a need to use PyMem_RawMalloc()."

Well, the difference between PyMem_Malloc() and PyMem_RawMalloc() is subtle. Right now, it should only impact debug tools hooking on the memory allocators.

But one day I would like to try to modify PyMem_Malloc() to reuse PyObject_Malloc(). I don't see why PyMem_Malloc() shouldn't be optimized for small applications. But it's hard to benchmark such change, and it depends on the platform. I already had to use different config for memory allocators depending on the platform :-/ The implementation of tracemalloc uses a different overallocation factor on Windows and on other platforms.
History
Date User Action Args
2015-09-17 12:58:35vstinnersetrecipients: + vstinner, rhettinger, serhiy.storchaka
2015-09-17 12:58:35vstinnersetmessageid: <1442494715.17.0.135663945739.issue25135@psf.upfronthosting.co.za>
2015-09-17 12:58:35vstinnerlinkissue25135 messages
2015-09-17 12:58:34vstinnercreate