1 #ifndef JEMALLOC_INTERNAL_ARENA_TYPES_H 2 #define JEMALLOC_INTERNAL_ARENA_TYPES_H 3 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) 7 8 /* Default decay times in milliseconds. */ 9 #if defined(__ANDROID__) 10 #define DIRTY_DECAY_MS_DEFAULT ZD(0) 11 #define MUZZY_DECAY_MS_DEFAULT ZD(0) 12 #else 13 #define DIRTY_DECAY_MS_DEFAULT ZD(10 * 1000) 14 #define MUZZY_DECAY_MS_DEFAULT ZD(10 * 1000) 15 #endif 16 /* Number of event ticks between time checks. */ 17 #define DECAY_NTICKS_PER_UPDATE 1000 18 19 typedef struct arena_slab_data_s arena_slab_data_t; 20 typedef struct arena_decay_s arena_decay_t; 21 typedef struct arena_s arena_t; 22 typedef struct arena_tdata_s arena_tdata_t; 23 typedef struct alloc_ctx_s alloc_ctx_t; 24 25 typedef enum { 26 percpu_arena_mode_names_base = 0, /* Used for options processing. */ 27 28 /* 29 * *_uninit are used only during bootstrapping, and must correspond 30 * to initialized variant plus percpu_arena_mode_enabled_base. 31 */ 32 percpu_arena_uninit = 0, 33 per_phycpu_arena_uninit = 1, 34 35 /* All non-disabled modes must come after percpu_arena_disabled. */ 36 percpu_arena_disabled = 2, 37 38 percpu_arena_mode_names_limit = 3, /* Used for options processing. */ 39 percpu_arena_mode_enabled_base = 3, 40 41 percpu_arena = 3, 42 per_phycpu_arena = 4 /* Hyper threads share arena. */ 43 } percpu_arena_mode_t; 44 45 #define PERCPU_ARENA_ENABLED(m) ((m) >= percpu_arena_mode_enabled_base) 46 #define PERCPU_ARENA_DEFAULT percpu_arena_disabled 47 48 #endif /* JEMALLOC_INTERNAL_ARENA_TYPES_H */ 49