summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/prof_inlines_a.h
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2019-04-03 00:50:42 (GMT)
committerQi Wang <interwq@gwu.edu>2019-04-03 00:50:42 (GMT)
commitb0b3e49a54ec29e32636f4577d9d5a896d67fd20 (patch)
treee80fd5feaedd401e7e2c884e73f8c884f51b5a65 /include/jemalloc/internal/prof_inlines_a.h
parent61efbda7098de6fe64c362d309824864308c36d4 (diff)
parentf7489dc8f1fac233b0cd4e40331de8b738b1f2e2 (diff)
downloadjemalloc-5.2.0.zip
jemalloc-5.2.0.tar.gz
jemalloc-5.2.0.tar.bz2
Merge branch 'dev'5.2.0
Diffstat (limited to 'include/jemalloc/internal/prof_inlines_a.h')
-rw-r--r--include/jemalloc/internal/prof_inlines_a.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/jemalloc/internal/prof_inlines_a.h b/include/jemalloc/internal/prof_inlines_a.h
index a6efb48..471d985 100644
--- a/include/jemalloc/internal/prof_inlines_a.h
+++ b/include/jemalloc/internal/prof_inlines_a.h
@@ -4,7 +4,8 @@
#include "jemalloc/internal/mutex.h"
static inline bool
-prof_accum_add(tsdn_t *tsdn, prof_accum_t *prof_accum, uint64_t accumbytes) {
+prof_accum_add(tsdn_t *tsdn, prof_accum_t *prof_accum,
+ uint64_t accumbytes) {
cassert(config_prof);
bool overflow;
@@ -42,7 +43,8 @@ prof_accum_add(tsdn_t *tsdn, prof_accum_t *prof_accum, uint64_t accumbytes) {
}
static inline void
-prof_accum_cancel(tsdn_t *tsdn, prof_accum_t *prof_accum, size_t usize) {
+prof_accum_cancel(tsdn_t *tsdn, prof_accum_t *prof_accum,
+ size_t usize) {
cassert(config_prof);
/*
@@ -55,15 +57,15 @@ prof_accum_cancel(tsdn_t *tsdn, prof_accum_t *prof_accum, size_t usize) {
#ifdef JEMALLOC_ATOMIC_U64
a0 = atomic_load_u64(&prof_accum->accumbytes, ATOMIC_RELAXED);
do {
- a1 = (a0 >= LARGE_MINCLASS - usize) ? a0 - (LARGE_MINCLASS -
- usize) : 0;
+ a1 = (a0 >= SC_LARGE_MINCLASS - usize)
+ ? a0 - (SC_LARGE_MINCLASS - usize) : 0;
} while (!atomic_compare_exchange_weak_u64(&prof_accum->accumbytes, &a0,
a1, ATOMIC_RELAXED, ATOMIC_RELAXED));
#else
malloc_mutex_lock(tsdn, &prof_accum->mtx);
a0 = prof_accum->accumbytes;
- a1 = (a0 >= LARGE_MINCLASS - usize) ? a0 - (LARGE_MINCLASS - usize) :
- 0;
+ a1 = (a0 >= SC_LARGE_MINCLASS - usize)
+ ? a0 - (SC_LARGE_MINCLASS - usize) : 0;
prof_accum->accumbytes = a1;
malloc_mutex_unlock(tsdn, &prof_accum->mtx);
#endif