Arena: Add helper function arena_get_from_extent.
This commit is contained in:
committed by
David Goldblatt
parent
c97d255752
commit
3d84bd57f4
@@ -8,6 +8,12 @@
|
||||
#include "jemalloc/internal/sz.h"
|
||||
#include "jemalloc/internal/ticker.h"
|
||||
|
||||
static inline arena_t *
|
||||
arena_get_from_extent(extent_t *extent) {
|
||||
return (arena_t *)atomic_load_p(&arenas[extent_arena_ind_get(extent)],
|
||||
ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE bool
|
||||
arena_has_default_hooks(arena_t *arena) {
|
||||
return (extent_hooks_get(arena) == &extent_hooks_default);
|
||||
|
Reference in New Issue
Block a user