Merge branch 'dev-align' of https://github.com/microsoft/mimalloc into dev-align

This commit is contained in:
Daan 2022-11-06 14:51:37 -08:00
commit d1ae630dec
2 changed files with 5 additions and 3 deletions

View file

@ -1275,7 +1275,7 @@ static mi_page_t* mi_segment_huge_page_alloc(size_t size, size_t page_alignment,
// overallocate to accommodate large alignments.
size_t psize;
_mi_segment_page_start(segment, page, 0, &psize, NULL);
page->xblock_size = (psize > MI_HUGE_BLOCK_SIZE ? MI_HUGE_BLOCK_SIZE : psize);
page->xblock_size = (psize > MI_HUGE_BLOCK_SIZE ? MI_HUGE_BLOCK_SIZE : (uint32_t)psize);
return page;
}