Author vstinner
Recipients neologix, njs, pitrou, rhettinger, tim.peters, vstinner
Date 2014-12-05.22:15:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417817718.88.0.594601568713.issue18835@psf.upfronthosting.co.za>
In-reply-to
Content
PyMem_GetAllocator() and PyMem_SetAllocator() have a domain parameter which can take 3 values: PYMEM_DOMAIN_RAW, PYMEM_DOMAIN_MEM and PYMEM_DOMAIN_OBJ.

I don't think that we need 3 flavors of allocators (PyMem_Raw, PyMem, PyObject).

Maybe the PYMEM_DOMAIN_RAW domain is enough: OS functions don't require the GIL. In this case, should we add a new pair of Get/Set functions with an associated structure? Or maybe PyMem_SetAllocator() may ignore the aligned members of the patched PyMemAllocatorEx structure for domains other than PYMEM_DOMAIN_RAW? And PyMem_GetAllocator() would fill members with NULL.
History
Date User Action Args
2014-12-05 22:15:18vstinnersetrecipients: + vstinner, tim.peters, rhettinger, pitrou, njs, neologix
2014-12-05 22:15:18vstinnersetmessageid: <1417817718.88.0.594601568713.issue18835@psf.upfronthosting.co.za>
2014-12-05 22:15:18vstinnerlinkissue18835 messages
2014-12-05 22:15:18vstinnercreate