C-API docs: Clarify the size of arenas#110895
Conversation
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.
Sorry, something went wrong.
|
I skipped creating an issue, but I'm willing to create one if it's more appropriate for this request. |
Sorry, something went wrong.
|
cc @nascheme Ah right, the arena size was changed by commit 85b6b70 (PR GH-14474, issue gh-81629): -#define ARENA_SIZE (256 << 10) /* 256KB */
+#ifdef USE_LARGE_ARENAS
+#define ARENA_BITS 20 /* 1 MiB */
+#else
+#define ARENA_BITS 18 /* 256 KiB */
+#endifwith: #if SIZEOF_VOID_P > 4
/* on 64-bit platforms use larger pools and arenas if we can */
#define USE_LARGE_ARENAS
...
#endif |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
Sorry, something went wrong.
|
The docs update is correct. |
Sorry, something went wrong.
|
Thanks @mienxiu for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
|
Thanks @mienxiu for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
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 f07ca27) Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
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 f07ca27) Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
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 f07ca27) Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
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 f07ca27) Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
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.
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.
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.
This is changed in #14474 (bpo-37448).
The following links are the relevant lines in the C code for your reference.
📚 Documentation preview 📚: https://cpython-previews--110895.org.readthedocs.build/