[Python-Dev] RFC: PEP 445: Add new APIs to customize Python memory allocators

Kristján Valur Jónsson kristjan at ccpgames.com
Thu Jun 20 12:44:08 CEST 2013


Oh, please don't misunderstand.  I'm not making any demands or requirements, 
what I'm trying to do is to make recommendations based on experience that I 
have had with embedding.  This sound altogether too much like I'm trying to
push things one way or the other :)

The api as laid out certainly seems to work, and be adequate for the purpose.

I can add here as a point of information that since we
work on windows, there was no need to pass in the "size" argument to the
"munmap" callback.  VirtualFree(address, NULL) will release the entire chunk
of memory that was initially allocated at that place.  Therefor in our implementation
we can reuse the same allocator structo for those arenas.  But I understand
that munmap doesn't have this feature, so passing in the size is prudent.

K

> -----Original Message-----
> From: Victor Stinner [mailto:victor.stinner at gmail.com]
> Sent: 19. júní 2013 15:59
> To: Kristján Valur Jónsson
> Cc: Python Dev
> Subject: Re: [Python-Dev] RFC: PEP 445: Add new APIs to customize Python
> memory allocators
> 
> Is PyMemMappingAllocator complete enough for your usage at CCP Games?



More information about the Python-Dev mailing list