1 #ifndef JEMALLOC_INTERNAL_BASE_STRUCTS_H
2 #define JEMALLOC_INTERNAL_BASE_STRUCTS_H
4 #include "jemalloc/internal/jemalloc_internal_types.h"
5 #include "jemalloc/internal/mutex.h"
6 #include "jemalloc/internal/size_classes.h"
8 /* Embedded at the beginning of every block of base-managed virtual memory. */
10 /* Total size of block's virtual memory mapping. */
13 /* Next block in list of base's blocks. */
16 /* Tracks unused trailing space. */
21 /* Associated arena's index within the arenas array. */
25 * User-configurable extent hook functions. Points to an
28 atomic_p_t extent_hooks;
30 /* Protects base_alloc() and base_stats_get() operations. */
33 /* Using THP when true (metadata_thp auto mode). */
34 bool auto_thp_switched;
36 * Most recent size class in the series of increasingly large base
37 * extents. Logarithmic spacing between subsequent allocations ensures
38 * that the total number of distinct mappings remains small.
42 /* Serial number generation state. */
43 size_t extent_sn_next;
45 /* Chain of all blocks associated with base. */
48 /* Heap of extents that track unused trailing space within blocks. */
49 extent_heap_t avail[NSIZES];
51 /* Stats, only maintained if config_stats. */
55 /* Number of THP regions touched. */
59 #endif /* JEMALLOC_INTERNAL_BASE_STRUCTS_H */