mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #18874: _PyObject_Malloc/Realloc/Free() now falls back on
_PyMem_RawMalloc/Realloc/Free, instead of _PyMem_Malloc/Realloc/Free. So it becomes possible to use the fast pymalloc allocator for the PYMEM_DOMAIN_MEM domain (PyMem_Malloc/Realloc/Free functions).
This commit is contained in:
parent
7c74de4d00
commit
6cf185dc06
2 changed files with 21 additions and 19 deletions
|
|
@ -288,8 +288,8 @@ Customize PyObject Arena Allocator
|
|||
Python has a *pymalloc* allocator for allocations smaller than 512 bytes. This
|
||||
allocator is optimized for small objects with a short lifetime. It uses memory
|
||||
mappings called "arenas" with a fixed size of 256 KB. It falls back to
|
||||
:c:func:`PyMem_Malloc` and :c:func:`PyMem_Realloc` for allocations larger than
|
||||
512 bytes. *pymalloc* is the default allocator used by
|
||||
:c:func:`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger
|
||||
than 512 bytes. *pymalloc* is the default allocator used by
|
||||
:c:func:`PyObject_Malloc`.
|
||||
|
||||
The default arena allocator uses the following functions:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue