41e0b857be
Header files are now self-contained, which makes the relationships between the files clearer, and crucially allows LSP tools like `clangd` to function correctly in all of our header files. I have verified that the headers are self-contained (aside from the various Windows shims) by compiling them as if they were C files – in a follow-up commit I plan to add this to CI to ensure we don't regress on this front.
28 lines
722 B
C
28 lines
722 B
C
#ifndef JEMALLOC_INTERNAL_ARENA_INLINES_A_H
|
|
#define JEMALLOC_INTERNAL_ARENA_INLINES_A_H
|
|
|
|
#include "jemalloc/internal/jemalloc_preamble.h"
|
|
#include "jemalloc/internal/arena_structs.h"
|
|
|
|
static inline unsigned
|
|
arena_ind_get(const arena_t *arena) {
|
|
return arena->ind;
|
|
}
|
|
|
|
static inline void
|
|
arena_internal_add(arena_t *arena, size_t size) {
|
|
atomic_fetch_add_zu(&arena->stats.internal, size, ATOMIC_RELAXED);
|
|
}
|
|
|
|
static inline void
|
|
arena_internal_sub(arena_t *arena, size_t size) {
|
|
atomic_fetch_sub_zu(&arena->stats.internal, size, ATOMIC_RELAXED);
|
|
}
|
|
|
|
static inline size_t
|
|
arena_internal_get(arena_t *arena) {
|
|
return atomic_load_zu(&arena->stats.internal, ATOMIC_RELAXED);
|
|
}
|
|
|
|
#endif /* JEMALLOC_INTERNAL_ARENA_INLINES_A_H */
|