summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorMienxiu <82512658+mienxiu@users.noreply.github.com>2023-10-16 18:52:13 (GMT)
committerGitHub <noreply@github.com>2023-10-16 18:52:13 (GMT)
commitf07ca27709855d4637b43bba23384cc795143ee3 (patch)
tree50fa5c79d745421352ecb7a9af191025abebcfb1 /Doc/c-api
parent6a4528d70c8435d4403e09937068a446f35a78ac (diff)
downloadcpython-f07ca27709855d4637b43bba23384cc795143ee3.zip
cpython-f07ca27709855d4637b43bba23384cc795143ee3.tar.gz
cpython-f07ca27709855d4637b43bba23384cc795143ee3.tar.bz2
C-API docs: Clarify the size of arenas (#110895)
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.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/memory.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst
index e98c178..52ef417 100644
--- a/Doc/c-api/memory.rst
+++ b/Doc/c-api/memory.rst
@@ -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