Skip to content

Commit 84334e4

Browse files
committed
decrease meta allocation zone to 4k (to reduce .bss)
1 parent 58fbb67 commit 84334e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arena.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ static bool mi_arena_memid_indices(mi_memid_t memid, size_t* arena_index, mi_bit
137137

138138
/* -----------------------------------------------------------
139139
Special static area for mimalloc internal structures
140-
to avoid OS calls (for example, for the arena metadata)
140+
to avoid OS calls (for example, for the arena metadata (~= 256b))
141141
----------------------------------------------------------- */
142142

143-
#define MI_ARENA_STATIC_MAX (MI_INTPTR_SIZE*MI_KiB) // 8 KiB on 64-bit
143+
#define MI_ARENA_STATIC_MAX ((MI_INTPTR_SIZE/2)*MI_KiB) // 4 KiB on 64-bit
144144

145145
static mi_decl_cache_align uint8_t mi_arena_static[MI_ARENA_STATIC_MAX]; // must be cache aligned, see issue #895
146146
static mi_decl_cache_align _Atomic(size_t) mi_arena_static_top;

0 commit comments

Comments
 (0)