Message250883
"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. |
|
Date |
User |
Action |
Args |
2015-09-17 12:58:35 | vstinner | set | recipients:
+ vstinner, rhettinger, serhiy.storchaka |
2015-09-17 12:58:35 | vstinner | set | messageid: <1442494715.17.0.135663945739.issue25135@psf.upfronthosting.co.za> |
2015-09-17 12:58:35 | vstinner | link | issue25135 messages |
2015-09-17 12:58:34 | vstinner | create | |
|