1 #ifndef JEMALLOC_INTERNAL_BITMAP_STRUCTS_H
2 #define JEMALLOC_INTERNAL_BITMAP_STRUCTS_H
3 
4 struct bitmap_level_s {
5 	/* Offset of this level's groups within the array of groups. */
6 	size_t group_offset;
7 };
8 
9 struct bitmap_info_s {
10 	/* Logical number of bits in bitmap (stored at bottom level). */
11 	size_t nbits;
12 
13 #ifdef BITMAP_USE_TREE
14 	/* Number of levels necessary for nbits. */
15 	unsigned nlevels;
16 
17 	/*
18 	 * Only the first (nlevels+1) elements are used, and levels are ordered
19 	 * bottom to top (e.g. the bottom level is stored in levels[0]).
20 	 */
21 	bitmap_level_t levels[BITMAP_MAX_LEVELS+1];
22 #else /* BITMAP_USE_TREE */
23 	/* Number of groups necessary for nbits. */
24 	size_t ngroups;
25 #endif /* BITMAP_USE_TREE */
26 };
27 
28 #endif /* JEMALLOC_INTERNAL_BITMAP_STRUCTS_H */
29