mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-24 12:55:42 +03:00
Arena: Add helper function arena_get_from_extent.
This commit is contained in:
parent
c97d255752
commit
3d84bd57f4
4 changed files with 20 additions and 29 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue