mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-07 15:59:32 +03:00
more refined decommit extend delay
This commit is contained in:
parent
961778f0a7
commit
3ccf849c1a
1 changed files with 6 additions and 2 deletions
|
@ -540,9 +540,13 @@ static void mi_segment_perhaps_decommit(mi_segment_t* segment, uint8_t* p, size_
|
||||||
}
|
}
|
||||||
else if (segment->decommit_expire <= now) {
|
else if (segment->decommit_expire <= now) {
|
||||||
// previous decommit mask already expired
|
// previous decommit mask already expired
|
||||||
// mi_segment_delayed_decommit(segment, true, stats);
|
if (segment->decommit_expire + mi_option_get(mi_option_decommit_extend_delay) <= now) {
|
||||||
|
mi_segment_delayed_decommit(segment, true, stats);
|
||||||
|
}
|
||||||
|
else {
|
||||||
segment->decommit_expire = now + mi_option_get(mi_option_decommit_extend_delay); // (mi_option_get(mi_option_decommit_delay) / 8); // wait a tiny bit longer in case there is a series of free's
|
segment->decommit_expire = now + mi_option_get(mi_option_decommit_extend_delay); // (mi_option_get(mi_option_decommit_delay) / 8); // wait a tiny bit longer in case there is a series of free's
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// previous decommit mask is not yet expired, increase the expiration by a bit.
|
// previous decommit mask is not yet expired, increase the expiration by a bit.
|
||||||
segment->decommit_expire += mi_option_get(mi_option_decommit_extend_delay);
|
segment->decommit_expire += mi_option_get(mi_option_decommit_extend_delay);
|
||||||
|
|
Loading…
Add table
Reference in a new issue