mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
add extra runtime check to ensure we never insert large or huge pages in the segment free queue (issue #870)
This commit is contained in:
parent
07ae64bd81
commit
f141ca12a4
1 changed files with 4 additions and 2 deletions
|
@ -746,8 +746,10 @@ void _mi_segment_page_free(mi_page_t* page, bool force, mi_segments_tld_t* tld)
|
||||||
}
|
}
|
||||||
else if (segment->used + 1 == segment->capacity) {
|
else if (segment->used + 1 == segment->capacity) {
|
||||||
mi_assert_internal(segment->page_kind <= MI_PAGE_MEDIUM); // for now we only support small and medium pages
|
mi_assert_internal(segment->page_kind <= MI_PAGE_MEDIUM); // for now we only support small and medium pages
|
||||||
// move back to segments free list
|
if (segment->page_kind <= MI_PAGE_MEDIUM) {
|
||||||
mi_segment_insert_in_free_queue(segment,tld);
|
// move back to segments free list
|
||||||
|
mi_segment_insert_in_free_queue(segment,tld);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue