1 #ifndef JEMALLOC_INTERNAL_ARENA_TYPES_H
2 #define JEMALLOC_INTERNAL_ARENA_TYPES_H
4 /* Maximum number of regions in one slab. */
5 #define LG_SLAB_MAXREGS (LG_PAGE - LG_TINY_MIN)
6 #define SLAB_MAXREGS (1U << LG_SLAB_MAXREGS)
8 /* Default decay times in milliseconds. */
9 #define DIRTY_DECAY_MS_DEFAULT ZD(10 * 1000)
10 #define MUZZY_DECAY_MS_DEFAULT ZD(10 * 1000)
11 /* Number of event ticks between time checks. */
12 #define DECAY_NTICKS_PER_UPDATE 1000
14 typedef struct arena_slab_data_s arena_slab_data_t;
15 typedef struct arena_decay_s arena_decay_t;
16 typedef struct arena_s arena_t;
17 typedef struct arena_tdata_s arena_tdata_t;
18 typedef struct alloc_ctx_s alloc_ctx_t;
21 percpu_arena_mode_names_base = 0, /* Used for options processing. */
24 * *_uninit are used only during bootstrapping, and must correspond
25 * to initialized variant plus percpu_arena_mode_enabled_base.
27 percpu_arena_uninit = 0,
28 per_phycpu_arena_uninit = 1,
30 /* All non-disabled modes must come after percpu_arena_disabled. */
31 percpu_arena_disabled = 2,
33 percpu_arena_mode_names_limit = 3, /* Used for options processing. */
34 percpu_arena_mode_enabled_base = 3,
37 per_phycpu_arena = 4 /* Hyper threads share arena. */
38 } percpu_arena_mode_t;
40 #define PERCPU_ARENA_ENABLED(m) ((m) >= percpu_arena_mode_enabled_base)
41 #define PERCPU_ARENA_DEFAULT percpu_arena_disabled
43 #endif /* JEMALLOC_INTERNAL_ARENA_TYPES_H */