/xnu-2422.115.4/osfmk/kern/ |
H A D | gzalloc.c | 32 * "Guard mode" zone allocator, used to trap use-after-free errors, 34 * zone element use, timing dependent races etc. 42 * gzalloc_fc_size=<size>: number of zone elements (effectively page 51 * element has a "header" (trailer in underflow detection mode), the zone 252 gzalloc_alloc(zone_t zone, boolean_t canblock) { argument 256 (((zone->elem_size >= gzalloc_min) && 257 (zone->elem_size <= gzalloc_max))) && 258 (zone->gzalloc_exempt == 0))) { 268 vm_offset_t rounded_size = round_page(zone->elem_size + GZHEADER_SIZE); 269 vm_offset_t residue = rounded_size - zone 336 gzalloc_free(zone_t zone, void *addr) argument [all...] |
H A D | zalloc.h | 90 * A zone is a collection of fixed size blocks for which there 92 * use zones to manage data structures dynamically, creating a zone 100 struct zone { struct 103 queue_head_t any_free_foreign; /* foreign pages crammed into zone */ 110 lck_attr_t lock_attr; /* zone lock attribute */ 111 decl_lck_mtx_data(,lock) /* zone lock */ 114 vm_size_t max_size; /* how large can this zone grow */ 117 uint64_t page_count __attribute__((aligned(8))); /* number of pages used by this zone */ 118 uint64_t sum_count; /* count of allocs (life of zone) */ 122 /* boolean_t */ expandable :1, /* (T) expand zone (wit [all...] |
H A D | zalloc.c | 62 * Zone-based memory allocator. A zone is a collection of fixed size 109 * into the zone, the page is translated to use the alias address of the page 122 * zinit favors using PAGE_SIZE backing allocations for a zone unless it would 154 * We use three techniques to detect modification of a zone element 168 * (1) and (2) occur for every allocation and free to a zone. 172 * Poisoning (3) occurs periodically for every N frees (counted per-zone) 184 * of zone memory, look up the "Guard mode" zone allocator in gzalloc.c. 189 * "zlog=<zone name to log> -zc". Search for "Zone corruption logging" later 194 * To debug leaks of zone memor 357 zone_t zone; member in struct:zone_page_metadata 382 is_sane_zone_ptr(zone_t zone, vm_offset_t addr, size_t obj_size) argument 429 is_sane_zone_page_metadata(zone_t zone, vm_offset_t page_meta) argument 439 is_sane_zone_element(zone_t zone, vm_offset_t addr) argument 450 zone_element_was_modified_panic(zone_t zone, vm_offset_t found, vm_offset_t expected, vm_offset_t offset) argument 471 backup_ptr_mismatch_panic(zone_t zone, vm_offset_t primary, vm_offset_t backup) argument 518 append_zone_element(zone_t zone, struct zone_free_element *tail, struct zone_free_element *elem) argument 550 add_list_to_zone(zone_t zone, struct zone_free_element *head, struct zone_free_element *tail) argument 569 free_to_zone(zone_t zone, vm_offset_t element) argument 660 try_alloc_from_zone(zone_t zone) argument 1915 zcram( zone_t zone, vm_offset_t newmem, vm_size_t size) argument 2020 zfill( zone_t zone, int nelem) argument 2284 zalloc_canblock( zone_t zone, boolean_t canblock) argument 2573 zalloc( register zone_t zone) argument 2580 zalloc_noblock( register zone_t zone) argument 2635 zget( register zone_t zone) argument 2690 zone_check_freelist(zone_t zone, vm_offset_t elem) argument 2742 zfree( register zone_t zone, void *addr) argument 2920 zone_change( zone_t zone, unsigned int item, boolean_t value) argument 2979 zone_free_count(zone_t zone) argument [all...] |
H A D | kern_types.h | 43 struct zone ; 53 typedef struct zone *zone_t;
|
H A D | debug.c | 554 struct zone zone_copy; 557 if(ml_nofault_copy((vm_offset_t)first_zone, (vm_offset_t)&zone_copy, sizeof(struct zone)) == sizeof(struct zone)) { 567 if(ml_nofault_copy((vm_offset_t)zone_copy.next_zone, (vm_offset_t)&zone_copy, sizeof(struct zone)) != sizeof(struct zone)) { 588 * Prints the backtrace most suspected of being a leaker, if we paniced in the zone allocator.
|
H A D | kalloc.c | 99 int kalloc_fake_zone_index = -1; /* index of our fake zone in statistics arrays */ 141 * next nearest sized zone. This allocator is built on top of 142 * the zone allocator. A zone is created for each potential size 148 * It represents the first power of two for which no zone exists. 150 * rounding, for which no zone exists. 241 #error missing zone size parameters for kalloc 258 * size normalized to the minimum alignment, finds the right zone index 285 * Max number of elements per zone. zinit rounds things up correctly 286 * Doing things this way permits each zone t [all...] |
/xnu-2422.115.4/security/ |
H A D | mac_alloc.c | 148 mac_zone_change(zone_t zone, unsigned int item, boolean_t value) argument 151 zone_change(zone, item, value); 155 mac_zalloc(zone_t zone, int how) argument 159 return zalloc(zone); 161 return zalloc_noblock(zone); 165 mac_zfree(zone_t zone, void *elem) argument 168 zfree(zone, elem);
|
H A D | mac_alloc.h | 65 void mac_zone_change (zone_t zone, unsigned int item, boolean_t value); 66 void * mac_zalloc (zone_t zone, int how); 67 void mac_zfree (zone_t zone, void *elem); 70 #define Z_EXHAUST 1 /* Make zone exhaustible */ 71 #define Z_COLLECT 2 /* Make zone collectable */ 72 #define Z_EXPAND 3 /* Make zone expandable */ 73 #define Z_FOREIGN 4 /* Allow collectable zone to contain foreign elements */
|
/xnu-2422.115.4/bsd/dev/dtrace/scripts/ |
H A D | socket.d | 48 int zone; 63 zone = T->so_zone;
|
/xnu-2422.115.4/tools/lldbmacros/ |
H A D | memory.py | 129 @lldb_type_summary(['zone','zone_t']) 132 def GetZoneSummary(zone): 133 """ Summarize a zone with important information. See help zprint for description of each field 135 zone: value - obj representing a zone in kernel 137 str - summary of the zone 143 free_elements = (zone.cur_size / zone.elem_size) - zone.count 144 free_size = free_elements * zone [all...] |
/xnu-2422.115.4/bsd/dev/dtrace/ |
H A D | dtrace_alloc.c | 54 struct zone *d_zone[16]; 97 * Allocate a zone for each size we are going to handle. 118 * If size is too large for a zone, then use kmem_alloc. 156 /* free to the appropriate zone */
|
/xnu-2422.115.4/bsd/netinet/ |
H A D | mp_pcb.h | 69 struct zone *mppi_zone; /* zone for this PCB */
|
H A D | mptcp_var.h | 423 struct zone *mkph_key_entry_zone; /* zone for key entry */
|
H A D | in_pcb.h | 111 * NB: the zone allocator is type-stable EXCEPT FOR THE FIRST TWO LONGS 542 struct zone *ipi_zone;
|
/xnu-2422.115.4/bsd/net/ |
H A D | flowadv.c | 109 static struct zone *fadv_zone; /* zone for flowadv_fcentry */ 111 #define FADV_ZONE_MAX 32 /* maximum elements in zone */ 112 #define FADV_ZONE_NAME "fadv_zone" /* zone name */
|
H A D | if_llreach.c | 140 static struct zone *iflr_zone; /* zone for if_llreach */ 142 #define IFLR_ZONE_MAX 128 /* maximum elements in zone */ 143 #define IFLR_ZONE_NAME "if_llreach" /* zone name */
|
/xnu-2422.115.4/bsd/sys/ |
H A D | ubc_internal.h | 59 extern struct zone *ubc_info_zone;
|
H A D | pthread_shims.h | 174 void* (*zalloc)(zone_t zone); 175 void (*zfree)(zone_t zone, void* ptr);
|
H A D | mcache.h | 262 struct zone *mc_slab_zone; /* backend zone allocator */
|
/xnu-2422.115.4/bsd/net/classq/ |
H A D | classq_blue.c | 132 #define BLUE_ZONE_MAX 32 /* maximum elements in zone */ 133 #define BLUE_ZONE_NAME "classq_blue" /* zone name */ 135 static unsigned int blue_size; /* size of zone element */ 136 static struct zone *blue_zone; /* zone for blue */
|
H A D | classq_sfb.c | 180 #define SFB_ZONE_MAX 32 /* maximum elements in zone */ 181 #define SFB_ZONE_NAME "classq_sfb" /* zone name */ 183 #define SFB_BINS_ZONE_MAX 32 /* maximum elements in zone */ 184 #define SFB_BINS_ZONE_NAME "classq_sfb_bins" /* zone name */ 186 #define SFB_FCL_ZONE_MAX 32 /* maximum elements in zone */ 187 #define SFB_FCL_ZONE_NAME "classq_sfb_fcl" /* zone name */ 198 static unsigned int sfb_size; /* size of zone element */ 199 static struct zone *sfb_zone; /* zone for sfb */ 201 static unsigned int sfb_bins_size; /* size of zone elemen [all...] |
H A D | classq_red.c | 175 #define RED_ZONE_MAX 32 /* maximum elements in zone */ 176 #define RED_ZONE_NAME "classq_red" /* zone name */ 178 static unsigned int red_size; /* size of zone element */ 179 static struct zone *red_zone; /* zone for red */
|
H A D | classq_rio.c | 179 #define RIO_ZONE_MAX 32 /* maximum elements in zone */ 180 #define RIO_ZONE_NAME "classq_rio" /* zone name */ 182 static unsigned int rio_size; /* size of zone element */ 183 static struct zone *rio_zone; /* zone for rio */
|
/xnu-2422.115.4/bsd/netinet6/ |
H A D | nd6_prproxy.c | 180 static unsigned int ndprl_size; /* size of zone element */ 181 static struct zone *ndprl_zone; /* nd6_prproxy_prelist zone */ 183 #define NDPRL_ZONE_MAX 256 /* maximum elements in zone */ 184 #define NDPRL_ZONE_NAME "nd6_prproxy_prelist" /* name for zone */ 186 static unsigned int solsrc_size; /* size of zone element */ 187 static struct zone *solsrc_zone; /* nd6_prproxy_solsrc zone */ 189 #define SOLSRC_ZONE_MAX 256 /* maximum elements in zone */ 190 #define SOLSRC_ZONE_NAME "nd6_prproxy_solsrc" /* name for zone */ [all...] |
/xnu-2422.115.4/bsd/net/pktsched/ |
H A D | pktsched_cbq.c | 96 #define CBQ_ZONE_MAX 32 /* maximum elements in zone */ 97 #define CBQ_ZONE_NAME "pktsched_cbq" /* zone name */ 99 static unsigned int cbq_size; /* size of zone element */ 100 static struct zone *cbq_zone; /* zone for cbq */
|