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
|
|
@ -153,9 +153,9 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
|
|||
size_t gap_size_page = (uintptr_t)ret -
|
||||
(uintptr_t)gap_addr_page;
|
||||
if (gap_size_page != 0) {
|
||||
extent_init(gap, arena, gap_addr_page,
|
||||
gap_size_page, false, SC_NSIZES,
|
||||
arena_extent_sn_next(arena),
|
||||
extent_init(gap, arena_ind_get(arena),
|
||||
gap_addr_page, gap_size_page, false,
|
||||
SC_NSIZES, arena_extent_sn_next(arena),
|
||||
extent_state_active, false, true, true,
|
||||
EXTENT_NOT_HEAD);
|
||||
}
|
||||
|
|
@ -198,7 +198,8 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
|
|||
EXTENT_HOOKS_INITIALIZER;
|
||||
extent_t extent;
|
||||
|
||||
extent_init(&extent, arena, ret, size,
|
||||
extent_init(&extent,
|
||||
arena_ind_get(arena), ret, size,
|
||||
size, false, SC_NSIZES,
|
||||
extent_state_active, false, true,
|
||||
true, EXTENT_NOT_HEAD);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue