]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
C-API docs: Clarify the size of arenas (#110895)
authorMienxiu <82512658+mienxiu@users.noreply.github.com>
Mon, 16 Oct 2023 18:52:13 +0000 (03:52 +0900)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2023 18:52:13 +0000 (19:52 +0100)
Clarify the size of arenas

From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1
MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms.

Doc/c-api/memory.rst

index e98c178ac27a37ec09b0bbd510be994d3da09f73..52ef4170e8810bdcbfb0f5875a92aa4eb1250652 100644 (file)
@@ -626,7 +626,8 @@ The pymalloc allocator
 
 Python has a *pymalloc* allocator optimized for small objects (smaller or equal
 to 512 bytes) with a short lifetime. It uses memory mappings called "arenas"
-with a fixed size of 256 KiB. It falls back to :c:func:`PyMem_RawMalloc` and
+with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB on 64-bit
+platforms. It falls back to :c:func:`PyMem_RawMalloc` and
 :c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes.
 
 *pymalloc* is the :ref:`default allocator <default-memory-allocators>` of the