mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 00:23:33 +03:00
Header refactoring: Pull size helpers out of jemalloc module.
This commit is contained in:
parent
041e041e1f
commit
8261e581be
28 changed files with 636 additions and 590 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "test/jemalloc_test.h"
|
||||
|
||||
#include "jemalloc/internal/spin.h"
|
||||
|
||||
static unsigned arena_ind;
|
||||
static size_t sz;
|
||||
static size_t esz;
|
||||
|
|
@ -100,7 +102,7 @@ TEST_BEGIN(test_retained) {
|
|||
|
||||
arena_ind = do_arena_create(NULL);
|
||||
sz = nallocx(HUGEPAGE, 0);
|
||||
esz = sz + large_pad;
|
||||
esz = sz + sz_large_pad;
|
||||
|
||||
atomic_store_u(&epoch, 0, ATOMIC_RELAXED);
|
||||
|
||||
|
|
@ -136,9 +138,9 @@ TEST_BEGIN(test_retained) {
|
|||
arena_t *arena = arena_get(tsdn_fetch(), arena_ind, false);
|
||||
size_t usable = 0;
|
||||
size_t fragmented = 0;
|
||||
for (pszind_t pind = psz2ind(HUGEPAGE); pind <
|
||||
for (pszind_t pind = sz_psz2ind(HUGEPAGE); pind <
|
||||
arena->extent_grow_next; pind++) {
|
||||
size_t psz = pind2sz(pind);
|
||||
size_t psz = sz_pind2sz(pind);
|
||||
size_t psz_fragmented = psz % esz;
|
||||
size_t psz_usable = psz - psz_fragmented;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue