diff options
-rw-r--r-- | mwrap_core.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mwrap_core.h b/mwrap_core.h index 4dc28d4..d798b79 100644 --- a/mwrap_core.h +++ b/mwrap_core.h @@ -280,7 +280,7 @@ again: l = src_loc_get(t, k); if (l) { uatomic_add(&l->total, k->total); - uatomic_add(&l->allocations, 1); + uatomic_inc(&l->allocations); } else { size_t n = bt_bytelen(k) + sizeof(*k); struct cds_lfht_node *cur; @@ -462,7 +462,7 @@ void free(void *p) uatomic_add(&total_bytes_dec, h->size); uatomic_add(&l->freed_bytes, h->size); uatomic_set(&h->size, 0); - uatomic_add(&l->frees, 1); + uatomic_inc(&l->frees); uatomic_add(&l->age_total, age); CHECK(int, 0, pthread_mutex_lock(l->mtx)); |