| /xnu-11215/osfmk/kern/ |
| H A D | zalloc_internal.h | 227 struct zone { struct 647 (void)zone; in zone_elem_redzone() 663 return zone_elem_inner_offs(zone) - zone_elem_redzone(zone); in zone_elem_outer_offs() 677 return zone_elem_inner_size(zone) + zone_elem_redzone(zone); in zone_elem_outer_size() 691 return zone->z_elems_free + zone->z_recirc.zd_full * _zc_mag_size; in zone_count_free() 697 return zone->z_elems_avail - zone_count_free(zone); in zone_count_allocated() 724 zone_elem_inner_size(zone) * zone_count_free(zone)); in zone_size_free() 732 zone_elem_inner_size(zone) * zone_count_allocated(zone)); in zone_size_allocated() 738 return zone_size_wired(zone) - zone_scale_for_percpu(zone, in zone_size_wasted() 739 zone_elem_outer_size(zone) * zone->z_elems_avail); in zone_size_wasted() [all …]
|
| H A D | zalloc.c | 789 (void *)addr, zone_heap_name(zone), zone->z_name, zone_index(zone), in zone_page_metadata_index_confusion_panic() 801 (void *)addr, zone_heap_name(zone), zone->z_name, zone_index(zone), in zone_page_metadata_index_confusion_panic() 835 zone_heap_name(zone), zone->z_name); in zone_accounting_panic() 870 zone_heap_name(zone), zone->z_name); in zone_nofail_panic() 1294 zone_elem_inner_size(zone), zone, zone_heap_name(zone), zone_name(zone)); in zone_element_bounds_check_panic() 4037 assert(zone->z_self == zone); in zcram_and_lock() 4071 zone->z_wired_hwm = zone->z_wired_cur; in zcram_and_lock() 6094 zone = kqr.zone; in zfree_ext() 6271 assert(!zone->z_percpu && !zone->z_permanent && !zone->z_smr); 7378 assert(zone->z_self == zone); in _zalloc_permanent() [all …]
|
| H A D | zalloc.h | 324 zone_t zone); 340 zone_t zone, 630 zone_t zone); 664 zone_t zone); 695 zone_t zone, 702 zone_t zone, in __zalloc_flags() argument 739 zone_t zone, in zalloc_flags_buf() argument 1070 zone_t zone, 1091 #define zfree(zone, elem) ({ \ argument 1470 zalloc_flags(zone, flags) [all …]
|
| H A D | zalloc_ro_shim.h | 96 zone_t zone; member 119 z.zone = zone_create(name, size, flags); in zone_create_ro_shimmed() 168 return (zalloc_flags)(zone_id.zone, flags); in zalloc_ro_shimmed() 183 (zfree)(zone_id.zone, addr); in zfree_ro_shimmed()
|
| H A D | kern_types.h | 43 struct zone; 53 typedef struct zone *zone_t;
|
| H A D | kalloc.c | 248 zone_t zone; in kalloc_zone_for_size_with_flags() local 295 zone = zone_by_id(zid); in kalloc_zone_for_size_with_flags() 306 if (size > zone_elem_inner_size(zone)) { in kalloc_zone_for_size_with_flags() 307 zone++; in kalloc_zone_for_size_with_flags() 310 return zone; in kalloc_zone_for_size_with_flags() 1527 ^(zone_t zone){ in kalloc_type_create_zone_for_size() 1676 zone_t zone; in kalloc_type_distribute_zone_for_type() local 3332 zfree(zone, addr); in kern_os_zfree() 3334 if (zone_owns(zone, addr)) { in kern_os_zfree() 3335 zfree(zone, addr); in kern_os_zfree() [all …]
|
| /xnu-11215/tools/lldbmacros/kmemory/ |
| H A D | zone.py | 117 def zone(self): member in ZonePageMetadata 152 zone = self.zone 155 if zone.percpu: 158 zone.describe() 311 zone = meta.zone 332 self.zone = zone 349 zone = self.zone 371 zone = self.zone 427 zone = self.zone 687 zone = self.sbv [all …]
|
| H A D | __init__.py | 5 from .zone import *
|
| /xnu-11215/tools/lldbmacros/ |
| H A D | zonetriage.py | 67 zone = values.group('zone') 68 btlog = FindZoneBTLog(zone) 109 zone = values.group('zone') 111 correct_boot_args = re.search('zlog([1-9]|10)?=' + re.sub(' ', '.', zone), bootargs) 114 print("You may need to include: -zc -zp zlog([1-9]|10)?=" + re.sub(' ', '.', zone)) 116 def FindZoneBTLog(zone): argument 123 if zone == "%s" % zval.z_name:
|
| H A D | memory.py | 315 zone=zone, cpuinfo = cpu_info)) 389 zone = {} 408 zone["size"] = zone["page_count"] * pagesize 413 zone["used_size"] = zone["size"] - zone["free_size"] - zone["cached_size"] 426 …zone["allocation_waste"] = (zone["allocation_size"] % zone_val.z_elem_size) * zone["allocation_ncp… 447 return zone 700 if zone and zone.z_elem_size == size: 704 zone = zone.z_kt_next 713 print("Zone: %s (0x%x)" % (zone.z_name, zone)) 715 zone = zone.z_kt_next [all …]
|
| H A D | kasan.py | 184 def zone(self): member in MemObject 220 def zone(self): member in HeapMemObject 222 return self._meta.zone 275 def zone(self): member in VMMemObject 340 def __init__(self, addr, zone): argument 342 self._zone = zone 350 def zone(self): member in MTEMemObject 682 if mo.zone: 684 mo.zone.address, mo.zone.name)) 832 zname = wmo.zone.name [all …]
|
| H A D | mbufs.py | 39 zone = MbufZoneByName("mbuf") 41 zone = MbufZoneByName("data.mbuf.cluster.2k") 43 zone = MbufZoneByName("data.mbuf.cluster.4k") 45 zone = MbufZoneByName("data.mbuf.cluster.16k") 47 zone = MbufZoneByName("mbuf.composite.2k") 49 zone = MbufZoneByName("mbuf.composite.4k") 51 zone = MbufZoneByName("mbuf.composite.16k") 52 zone_stats = GetZone(zone[0], zone[1], [], [])
|
| H A D | Makefile | 50 kmemory/zone.py \
|
| /xnu-11215/doc/allocators/ |
| H A D | read-only.md | 7 The Read-Only Allocator is an extension of the zone allocator that facilitates 8 "read-only" allocations. Data allocated from a read-only zone can only be 71 through a genuine bug, or perhaps by an attacker targeting the zone allocator 85 zone, a new identifier must be added to the `zone_reserved_id_t` enumeration 94 Once a read-only zone is created, the API for using it is small and simple. 97 - `zalloc_ro`: Allocate an element from a read-only zone. 98 - `zfree_ro`: Free an element back to a read-only zone. Note that this is a 100 - `zone_require_ro`: Verify that an element belongs to a given read-only zone 102 - `zalloc_ro_mut`: Modify part of an element allocated from a read-only zone. 106 equal to the size of the elements in the zone.
|
| H A D | api-basics.md | 11 - the zone allocator subsystem (`<kern/zalloc.h>`) which is a slab-allocator of 37 The zone subsystem provides a `zalloc_permanent*` family of functions that help 40 Unlike the typical zone allocators, this allows for arbitrary sizes, in a 51 - `Z_WAITOK` means that the zone allocator can wait and block, 69 If `Z_NOFAIL` is incorrectly used, then the zone allocator will panic at runtime. 80 used when making a zone: 83 from other types (typically `zone_require` will be used with this zone), 128 - types should be small enough to fit in the zone allocator: 135 when this isn't possible, a zone should be considered.
|
| /xnu-11215/san/memory/ |
| H A D | kasan-classic.h | 145 struct zone *zone; member 155 struct zone **zonep);
|
| H A D | kasan-fakestack.c | 187 zone_t zone = fakestack_zones[sz_class]; in kasan_fakestack_alloc() local 194 ret = (uptr)zalloc_noblock(zone); in kasan_fakestack_alloc() 229 zone_t zone = fakestack_zones[sz_class]; in kasan_fakestack_free() local 230 assert(zone); in kasan_fakestack_free()
|
| /xnu-11215/osfmk/mach/ |
| H A D | mach_host.defs | 269 * Forces a zone allocator garbage collections pass. 360 * Returns information about a specific zone. 361 * The zone name is passed in via the argument name, 362 * info returns the zone info. 371 * Returns information about the largest zone. 372 * name returns the zone name, info returns the zone info. 396 * Returns BTLog records for a specific zone. 397 * The zone name is passed in via the argument name,
|
| /xnu-11215/doc/lifecycle/ |
| H A D | startup.md | 141 Initializes the zone allocator. 144 - `ZONE_VIEW_DEFINE`, `KALLOC_HEAP_DEFINE`: zone and kalloc heap views. 149 - Rank 1: `zone_init`: setup the zone subsystem, this allows for the already 152 - Rank 2: `vm_page_module_init`: create the "vm pages" zone. 157 (which are used for guard pages by the guard mode zone allocator). 163 - Middle: zone and kalloc heaps (`ZONE_VIEW_DEFINE`, `KALLOC_HEAP_DEFINE`).
|
| /xnu-11215/bsd/dev/dtrace/scripts/ |
| H A D | socket.d | 48 int zone; member 63 zone = T->so_zone;
|
| /xnu-11215/osfmk/mach_debug/ |
| H A D | zone_info.h | 162 uint16_t zone; member
|
| /xnu-11215/bsd/sys/ |
| H A D | ubc_internal.h | 63 extern struct zone *ubc_info_zone;
|
| H A D | mcache.h | 178 struct zone *mc_slab_zone; /* backend zone allocator */
|
| /xnu-11215/bsd/skywalk/mem/ |
| H A D | skmem_region_var.h | 222 struct zone *skr_zreg; /* backing zone (pseudo mode) */
|
| /xnu-11215/tests/ |
| H A D | os_refcnt.c | 41 #define zalloc_percpu(zone, flags) \ argument 44 #define zfree_percpu(zone, ptr) \ argument
|