mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
fix alignment test
This commit is contained in:
parent
3726cf94ba
commit
3c5e480ce7
1 changed files with 2 additions and 2 deletions
|
@ -332,6 +332,8 @@ static uint8_t* _mi_segment_page_start_from_slice(const mi_segment_t* segment, c
|
|||
if (block_size <= 64) { start_offset += 3*block_size; }
|
||||
else if (block_size <= 512) { start_offset += block_size; }
|
||||
}
|
||||
mi_assert_internal(_mi_is_aligned(pstart + start_offset, MI_MAX_ALIGN_SIZE));
|
||||
mi_assert_internal(block_size == 0 || block_size > MI_MAX_ALIGN_GUARANTEE || _mi_is_aligned(pstart + start_offset,block_size));
|
||||
if (page_size != NULL) { *page_size = psize - start_offset; }
|
||||
return (pstart + start_offset);
|
||||
}
|
||||
|
@ -360,8 +362,6 @@ static size_t mi_segment_calculate_slices(size_t required, size_t* info_slices)
|
|||
required = _mi_align_up(required, MI_SEGMENT_SLICE_SIZE) + page_size;
|
||||
}
|
||||
}
|
||||
mi_assert_internal(_mi_is_aligned(p, MI_MAX_ALIGN_SIZE));
|
||||
mi_assert_internal(block_size > MI_MAX_ALIGN_GUARANTEE || _mi_is_aligned(p,block_size));
|
||||
|
||||
isize = _mi_align_up(isize + guardsize, MI_SEGMENT_SLICE_SIZE);
|
||||
if (info_slices != NULL) *info_slices = isize / MI_SEGMENT_SLICE_SIZE;
|
||||
|
|
Loading…
Add table
Reference in a new issue