mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 16:13:38 +03:00
Extents: Break extent-struct/arena interactions
Specifically, the extent_arena_[g|s]et functions and the address randomization. These are the only things that tie the extent struct itself to the arena code.
This commit is contained in:
parent
529cfe2abc
commit
41187bdfb0
9 changed files with 106 additions and 83 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "test/jemalloc_test.h"
|
||||
|
||||
#define INVALID_ARENA_IND ((1U << MALLOCX_ARENA_BITS) - 1)
|
||||
|
||||
TEST_BEGIN(test_arena_slab_regind) {
|
||||
szind_t binind;
|
||||
|
||||
|
|
@ -7,8 +9,9 @@ TEST_BEGIN(test_arena_slab_regind) {
|
|||
size_t regind;
|
||||
extent_t slab;
|
||||
const bin_info_t *bin_info = &bin_infos[binind];
|
||||
extent_init(&slab, NULL, mallocx(bin_info->slab_size,
|
||||
MALLOCX_LG_ALIGN(LG_PAGE)), bin_info->slab_size, true,
|
||||
extent_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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue