mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
restore randomization when trying to reclaim abandoned segments
This commit is contained in:
parent
723869014f
commit
19ce2c6461
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ void _mi_arena_field_cursor_init(mi_heap_t* heap, mi_subproc_t* subproc, bool vi
|
||||||
else {
|
else {
|
||||||
// otherwise visit all starting at a random location
|
// otherwise visit all starting at a random location
|
||||||
if (abandoned_count > abandoned_list_count && max_arena > 0) {
|
if (abandoned_count > abandoned_list_count && max_arena > 0) {
|
||||||
current->start = 0; // (heap == NULL || max_arena == 0 ? 0 : (mi_arena_id_t)(_mi_heap_random_next(heap) % max_arena));
|
current->start = (heap == NULL || max_arena == 0 ? 0 : (mi_arena_id_t)(_mi_heap_random_next(heap) % max_arena));
|
||||||
current->end = current->start + max_arena;
|
current->end = current->start + max_arena;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue