mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
PA: Make mapped stat atomic.
We always have atomic_zu_t, and mapped/unmapped transitions are always expensive enough that trying to piggyback on a lock is a waste of time.
This commit is contained in:
committed by
David Goldblatt
parent
3c28aa6f17
commit
436789ad96
@@ -122,7 +122,8 @@ large_ralloc_no_move_expand(tsdn_t *tsdn, edata_t *edata, size_t usize,
|
||||
}
|
||||
|
||||
if (config_stats && mapped_add > 0) {
|
||||
pa_shard_stats_mapped_add(tsdn, &arena->pa_shard, mapped_add);
|
||||
atomic_fetch_add_zu(&arena->pa_shard.stats->mapped, mapped_add,
|
||||
ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
if (zero) {
|
||||
|
||||
Reference in New Issue
Block a user