- char *zone_name; /* a name for the zone */
- unsigned int
- /* boolean_t */ exhaustible :1, /* (F) merely return if empty? */
- /* boolean_t */ collectable :1, /* (F) garbage collect empty pages */
- /* boolean_t */ expandable :1, /* (T) expand zone (with message)? */
- /* boolean_t */ allows_foreign :1,/* (F) allow non-zalloc space */
- /* boolean_t */ doing_alloc :1, /* is zone expanding now? */
- /* boolean_t */ waiting :1, /* is thread waiting for expansion? */
- /* boolean_t */ async_pending :1; /* asynchronous allocation pending? */
- struct zone * next_zone; /* Link for all-zones list */
- call_entry_data_t call_async_alloc; /* callout for asynchronous alloc */
-#if ZONE_DEBUG
- queue_head_t active_zones; /* active elements */
-#endif /* ZONE_DEBUG */
- decl_simple_lock_data(,lock) /* generic lock */
+ uint64_t page_count __attribute__((aligned(8))); /* number of pages used by this zone */
+ uint64_t sum_count; /* count of allocs (life of zone) */
+ uint32_t
+ /* boolean_t */ exhaustible :1, /* (F) merely return if empty? */
+ /* boolean_t */ collectable :1, /* (F) garbage collect empty pages */
+ /* boolean_t */ expandable :1, /* (T) expand zone (with message)? */
+ /* boolean_t */ allows_foreign :1, /* (F) allow non-zalloc space */
+ /* boolean_t */ doing_alloc_without_vm_priv:1, /* is zone expanding now via a non-vm_privileged thread? */
+ /* boolean_t */ doing_alloc_with_vm_priv:1, /* is zone expanding now via a vm_privileged thread? */
+ /* boolean_t */ waiting :1, /* is thread waiting for expansion? */
+ /* boolean_t */ async_pending :1, /* asynchronous allocation pending? */
+ /* boolean_t */ zleak_on :1, /* Are we collecting allocation information? */
+ /* boolean_t */ caller_acct :1, /* do we account allocation/free to the caller? */
+ /* boolean_t */ noencrypt :1,
+ /* boolean_t */ no_callout :1,
+ /* boolean_t */ async_prio_refill :1,
+ /* boolean_t */ gzalloc_exempt :1,
+ /* boolean_t */ alignment_required :1,
+ /* boolean_t */ zone_logging :1, /* Enable zone logging for this zone. */
+ /* boolean_t */ zone_replenishing :1,
+ /* boolean_t */ kasan_quarantine :1,
+ /* boolean_t */ tags :1,
+ /* boolean_t */ tags_inline :1,
+ /* future */ tag_zone_index :6,
+ /* boolean_t */ zone_valid :1,
+ /* future */ _reserved :5;
+
+ int index; /* index into zone_info arrays for this zone */
+ const char *zone_name; /* a name for the zone */
+
+#if CONFIG_ZLEAKS
+ uint32_t zleak_capture; /* per-zone counter for capturing every N allocations */
+#endif /* CONFIG_ZLEAKS */
+ uint32_t zp_count; /* counter for poisoning every N frees */
+ vm_size_t prio_refill_watermark;
+ thread_t zone_replenish_thread;
+#if CONFIG_GZALLOC
+ gzalloc_data_t gz;
+#endif /* CONFIG_GZALLOC */
+
+#if KASAN_ZALLOC
+ vm_size_t kasan_redzone;
+#endif
+
+ btlog_t *zlog_btlog; /* zone logging structure to hold stacks and element references to those stacks. */