diff --git a/Include/internal/pycore_mimalloc.h b/Include/internal/pycore_mimalloc.h index dea88adac15db2..b38feda494207b 100644 --- a/Include/internal/pycore_mimalloc.h +++ b/Include/internal/pycore_mimalloc.h @@ -32,6 +32,11 @@ typedef enum { # define MI_NO_THP 1 // Do not use guarded allocations. The free-threaded GC does not support their block layout. # define MI_GUARDED 0 +// Use 16 KiB pages instead of the default 64 KiB in 64-bit platforms. +// TODO: 32-bit platforms may need tuning too. +# if SIZEOF_VOID_P == 8 +# define MI_SEGMENT_SLICE_SHIFT 14 +# endif #ifdef Py_DEBUG # define MI_DEBUG 2 #else