mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
fix freeing of segments on forced reclaim
This commit is contained in:
parent
cb433d272a
commit
62b8fb26b1
2 changed files with 4 additions and 1 deletions
|
@ -1123,7 +1123,10 @@ static void mi_segment_reclaim_force(mi_segment_t* segment, mi_heap_t* heap, mi_
|
|||
mi_assert_internal(res != MI_RECLAIMED); // due to block_size == 0
|
||||
if (res!=MI_RECLAIMED && res != NULL) {
|
||||
mi_assert_internal(res == segment);
|
||||
if (res->page_kind <= MI_PAGE_MEDIUM && mi_segment_has_free(res)) {
|
||||
if (res->used == 0) {
|
||||
mi_segment_free(segment, false, tld);
|
||||
}
|
||||
else if (res->page_kind <= MI_PAGE_MEDIUM && mi_segment_has_free(res)) {
|
||||
mi_segment_insert_in_free_queue(res, tld);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue