mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-12 06:08:42 +03:00
Ensure consistent types for template deduction
This commit is contained in:
parent
36ee5f9024
commit
ff1bb7dff5
1 changed files with 2 additions and 2 deletions
|
@ -479,7 +479,7 @@ static void mi_arena_schedule_purge(mi_arena_t* arena, size_t bitmap_idx, size_t
|
||||||
// schedule decommit
|
// schedule decommit
|
||||||
mi_msecs_t expire = mi_atomic_loadi64_relaxed(&arena->purge_expire);
|
mi_msecs_t expire = mi_atomic_loadi64_relaxed(&arena->purge_expire);
|
||||||
if (expire != 0) {
|
if (expire != 0) {
|
||||||
mi_atomic_addi64_acq_rel(&arena->purge_expire, delay/10); // add smallish extra delay
|
mi_atomic_addi64_acq_rel(&arena->purge_expire, (mi_msecs_t)delay/10); // add smallish extra delay
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mi_atomic_storei64_release(&arena->purge_expire, _mi_clock_now() + delay);
|
mi_atomic_storei64_release(&arena->purge_expire, _mi_clock_now() + delay);
|
||||||
|
@ -523,7 +523,7 @@ static bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool force, mi
|
||||||
if (!force && expire > now) return false;
|
if (!force && expire > now) return false;
|
||||||
|
|
||||||
// reset expire (if not already set concurrently)
|
// reset expire (if not already set concurrently)
|
||||||
mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, 0);
|
mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, (mi_msecs_t)0);
|
||||||
|
|
||||||
// potential purges scheduled, walk through the bitmap
|
// potential purges scheduled, walk through the bitmap
|
||||||
bool any_purged = false;
|
bool any_purged = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue