mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Rename extent_t to edata_t.
This frees us up from the unfortunate extent/extent2 naming collision.
This commit is contained in:
committed by
David Goldblatt
parent
865debda22
commit
a7862df616
@@ -7,24 +7,24 @@ TEST_BEGIN(test_arena_slab_regind) {
|
||||
|
||||
for (binind = 0; binind < SC_NBINS; binind++) {
|
||||
size_t regind;
|
||||
extent_t slab;
|
||||
edata_t slab;
|
||||
const bin_info_t *bin_info = &bin_infos[binind];
|
||||
extent_init(&slab, INVALID_ARENA_IND,
|
||||
edata_init(&slab, INVALID_ARENA_IND,
|
||||
mallocx(bin_info->slab_size, MALLOCX_LG_ALIGN(LG_PAGE)),
|
||||
bin_info->slab_size, true,
|
||||
binind, 0, extent_state_active, false, true, true,
|
||||
EXTENT_NOT_HEAD);
|
||||
assert_ptr_not_null(extent_addr_get(&slab),
|
||||
assert_ptr_not_null(edata_addr_get(&slab),
|
||||
"Unexpected malloc() failure");
|
||||
for (regind = 0; regind < bin_info->nregs; regind++) {
|
||||
void *reg = (void *)((uintptr_t)extent_addr_get(&slab) +
|
||||
void *reg = (void *)((uintptr_t)edata_addr_get(&slab) +
|
||||
(bin_info->reg_size * regind));
|
||||
assert_zu_eq(arena_slab_regind(&slab, binind, reg),
|
||||
regind,
|
||||
"Incorrect region index computed for size %zu",
|
||||
bin_info->reg_size);
|
||||
}
|
||||
free(extent_addr_get(&slab));
|
||||
free(edata_addr_get(&slab));
|
||||
}
|
||||
}
|
||||
TEST_END
|
||||
|
||||
Reference in New Issue
Block a user