}
/* update statistics */
- int new = atomic_exchange_and_add (&mp_.n_mmaps, 1) + 1;
+ int new = atomic_fetch_add_relaxed (&mp_.n_mmaps, 1) + 1;
atomic_max (&mp_.max_n_mmaps, new);
unsigned long sum;
- sum = atomic_exchange_and_add (&mp_.mmapped_mem, size) + size;
+ sum = atomic_fetch_add_relaxed (&mp_.mmapped_mem, size) + size;
atomic_max (&mp_.max_mmapped_mem, sum);
check_chunk (av, p);
set_head (p, (new_size - offset) | IS_MMAPPED);
INTERNAL_SIZE_T new;
- new = atomic_exchange_and_add (&mp_.mmapped_mem, new_size - size - offset)
+ new = atomic_fetch_add_relaxed (&mp_.mmapped_mem, new_size - size - offset)
+ new_size - size - offset;
atomic_max (&mp_.max_mmapped_mem, new);
return p;