diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-16 19:06:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-16 19:06:34 (GMT) |
commit | e8eb2bf7884292907878dca05082f3db9c31791e (patch) | |
tree | b2b8b1a294d82daf245f35a75fe333871c8b398f /Doc/c-api/memory.rst | |
parent | 6502a130e46a24267b9655e69e2300243c510dec (diff) | |
download | cpython-e8eb2bf7884292907878dca05082f3db9c31791e.zip cpython-e8eb2bf7884292907878dca05082f3db9c31791e.tar.gz cpython-e8eb2bf7884292907878dca05082f3db9c31791e.tar.bz2 |
[3.11] C-API docs: Clarify the size of arenas (GH-110895) (#110947)
C-API docs: Clarify the size of arenas (GH-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.
(cherry picked from commit f07ca27709855d4637b43bba23384cc795143ee3)
Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
Diffstat (limited to 'Doc/c-api/memory.rst')
-rw-r--r-- | Doc/c-api/memory.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst index 87b8603..27005f9 100644 --- a/Doc/c-api/memory.rst +++ b/Doc/c-api/memory.rst @@ -620,7 +620,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 |