mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-02 08:30:27 +03:00
Introduce getters for page allocator shard stats
Access nactive, ndirty and nmuzzy throught getters and not directly. There are no functional change, but getters are required to propagate HPA's statistics up to Page Allocator's statitics.
This commit is contained in:
parent
92aa52c062
commit
b2e59a96e1
3 changed files with 25 additions and 6 deletions
2
src/pa.c
2
src/pa.c
|
|
@ -11,7 +11,7 @@ pa_nactive_add(pa_shard_t *shard, size_t add_pages) {
|
|||
|
||||
static void
|
||||
pa_nactive_sub(pa_shard_t *shard, size_t sub_pages) {
|
||||
assert(atomic_load_zu(&shard->nactive, ATOMIC_RELAXED) >= sub_pages);
|
||||
assert(pa_shard_nactive(shard) >= sub_pages);
|
||||
atomic_fetch_sub_zu(&shard->nactive, sub_pages, ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue