Skip to content

Commit 636510a

Browse files
committed
fix wrong small free size alignment
1 parent f03c543 commit 636510a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/arena.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,9 @@ static mi_page_t* mi_arenas_page_alloc_fresh(mi_theap_t* theap, size_t slice_cou
979979
if (page_meta!=NULL) {
980980
mi_assert_internal(page_meta->block_size == 0);
981981
#if MI_PAGE_META_SMALL_IS_ALIGNED
982-
// if `block_size <= MI_SMALL_SIZE_MAX` we put the page info in front of the slice,
982+
// if `block_size <= MI_SMALL_MAX_OBJ_SIZE` we put the page info in front of the slice,
983983
// (note: it is important that `page_meta->block_size == 0` for `mi_arena_page_at_slice`)
984-
if (block_size <= MI_SMALL_SIZE_MAX) {
984+
if (!os_align && block_size <= MI_SMALL_MAX_OBJ_SIZE) {
985985
// put page info in front of the slice
986986
page = (mi_page_t*)slice_start;
987987
block_start = mi_page_block_start(block_size, os_align);

0 commit comments

Comments
 (0)