@@ -31,31 +31,31 @@ typedef struct {
3131 /* Hot fields: all fit within the first 64-byte cache line.
3232 * These are accessed on every alloc/free operation, so keeping
3333 * them colocated avoids extra cache misses */
34- void * user_pages_start ; /* Start of the pages backing this zone */
35- void * bitmap_start ; /* Start of the bitmap */
36- int64_t next_free_bit_slot ; /* The last bit slot returned by get_next_free_bit_slot */
37- uint64_t canary_secret ; /* Each zone has its own canary secret */
38- uint64_t pointer_mask ; /* Each zone has its own pointer protection secret */
39- bitmap_index_t max_bitmap_idx ; /* Max bitmap index for this bitmap */
40- uint32_t chunk_size ; /* Size of chunks managed by this zone */
41- free_bit_slot_t free_bit_slots_usable ; /* The oldest members of the free cache are served first */
42- free_bit_slot_t free_bit_slots_index ; /* Tracks how many entries in the cache are filled */
43- bool is_full ; /* Flags whether this zone is full to avoid bit slot searches */
44- bool internal ; /* Zones can be managed by iso_alloc or private */
34+ void * user_pages_start ; /* Start of the pages backing this zone */
35+ void * bitmap_start ; /* Start of the bitmap */
36+ int64_t next_free_bit_slot ; /* The last bit slot returned by get_next_free_bit_slot */
37+ uint64_t canary_secret ; /* Each zone has its own canary secret */
38+ uint64_t pointer_mask ; /* Each zone has its own pointer protection secret */
39+ bitmap_index_t max_bitmap_idx ; /* Max bitmap index for this bitmap */
40+ uint32_t chunk_size ; /* Size of chunks managed by this zone */
41+ free_bit_slot_t free_bit_slots_usable ; /* The oldest members of the free cache are served first */
42+ free_bit_slot_t free_bit_slots_index ; /* Tracks how many entries in the cache are filled */
43+ bool is_full ; /* Flags whether this zone is full to avoid bit slot searches */
44+ bool internal ; /* Zones can be managed by iso_alloc or private */
4545#if MEMORY_TAGGING
46- bool tagged ; /* Zone supports memory tagging */
46+ bool tagged ; /* Zone supports memory tagging */
4747#endif
48- int8_t preallocated_bitmap_idx ; /* The bitmap is preallocated and its index */
48+ int8_t preallocated_bitmap_idx ; /* The bitmap is preallocated and its index */
4949#if CPU_PIN
50- uint8_t cpu_core ; /* What CPU core this zone is pinned to */
50+ uint8_t cpu_core ; /* What CPU core this zone is pinned to */
5151#endif
5252 /* Warm/cold fields: accessed less frequently */
53- uint32_t bitmap_size ; /* Size of the bitmap in bytes */
54- uint32_t af_count ; /* Increment/Decrement with each alloc/free operation */
55- uint32_t chunk_count ; /* Total number of chunks in this zone */
56- uint32_t alloc_count ; /* Total number of lifetime allocations */
57- uint16_t index ; /* Zone index */
58- uint16_t next_sz_index ; /* What is the index of the next zone of this size */
53+ uint32_t bitmap_size ; /* Size of the bitmap in bytes */
54+ uint32_t af_count ; /* Increment/Decrement with each alloc/free operation */
55+ uint32_t chunk_count ; /* Total number of chunks in this zone */
56+ uint32_t alloc_count ; /* Total number of lifetime allocations */
57+ uint16_t index ; /* Zone index */
58+ uint16_t next_sz_index ; /* What is the index of the next zone of this size */
5959 /* Large cold array: only accessed when refilling the free list */
6060 bit_slot_t free_bit_slots [ZONE_FREE_LIST_SZ ]; /* A cache of bit slots that point to freed chunks */
6161} __attribute__((packed , aligned (sizeof (int64_t )))) iso_alloc_zone_t ;
0 commit comments