]> granicus.if.org Git - python/commit
Issue #3329: Implement the PEP 445
authorVictor Stinner <victor.stinner@gmail.com>
Sun, 7 Jul 2013 00:05:46 +0000 (02:05 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sun, 7 Jul 2013 00:05:46 +0000 (02:05 +0200)
commit0507bf56f0b1064a179464eb3a9d524fd6dad815
tree3221e4356dddf25fd2aef3f10f6d07e6e7e26255
parentdf715ba54d6a5cad9f59bffe1c2180691a999450
Issue #3329: Implement the PEP 445

Add new enum:

* PyMemAllocatorDomain

Add new structures:

* PyMemAllocator
* PyObjectArenaAllocator

Add new functions:

* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()

Changes:

* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
  of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
  PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
  macros
Doc/c-api/memory.rst
Doc/whatsnew/3.4.rst
Include/objimpl.h
Include/pymem.h
Misc/NEWS
Modules/_testcapimodule.c
Objects/object.c
Objects/obmalloc.c