| /xnu-11215/osfmk/kern/ |
| H A D | zalloc_bounds.c | 60 i = kalloc_type(int, Z_WAITOK); in kalloc_data_bound_checks() 63 a = kalloc_type(int, 10, Z_WAITOK); in kalloc_data_bound_checks() 67 a = kalloc_type(int, int, 10, Z_WAITOK); in kalloc_data_bound_checks() 78 ts = kalloc_type(struct turnstile, Z_WAITOK); in kalloc_type_bound_checks() 82 ts_a = kalloc_type(struct turnstile, 10, Z_WAITOK); in kalloc_type_bound_checks() 89 ts_a = kalloc_type(struct turnstile, struct turnstile, 10, Z_WAITOK); in kalloc_type_bound_checks()
|
| H A D | hv_io_notifier.c | 106 ion = kalloc_type(hv_ion_entry_t, Z_WAITOK | Z_NOFAIL); in hv_io_notifier_grp_add() 239 hv_ion_grp_t *grp = kalloc_type(hv_ion_grp_t, Z_WAITOK | Z_ZERO); in hv_io_notifier_grp_alloc()
|
| H A D | exclaves_resource.c | 256 table_t *table = kalloc_type(table_t, Z_WAITOK | Z_ZERO | Z_NOFAIL); in table_alloc() 259 table->t_buckets = kalloc_type(queue_head_t, nbuckets, in table_alloc() 381 exclaves_resource_domain_t *domain = kalloc_type( in exclaves_resource_domain_alloc() 392 table_item_t *item = kalloc_type(table_item_t, in exclaves_resource_domain_alloc() 407 exclaves_resource_t *resource = kalloc_type(exclaves_resource_t, in exclaves_resource_alloc() 430 table_item_t *name_item = kalloc_type(table_item_t, in exclaves_resource_alloc() 447 table_item_t *id_item = kalloc_type(table_item_t, in exclaves_resource_alloc() 1767 uint32_t *pages = kalloc_type(uint32_t, page_count, in shared_memory_map()
|
| H A D | task_ref.c | 394 task->ref_group = kalloc_type(struct os_refgrp, 2, in allocate_refgrp_default() 414 task->ref_group = kalloc_type(struct os_refgrp, in allocate_refgrp_full()
|
| H A D | core_analytics.c | 144 ca_event_t event = kalloc_type(struct _ca_event, flags); in core_analytics_allocate_event()
|
| /xnu-11215/bsd/netkey/ |
| H A D | keydb.c | 91 return kalloc_type(struct secpolicy, Z_WAITOK | Z_ZERO); in keydb_newsecpolicy() 110 p = kalloc_type(struct secashead, Z_NOWAIT | Z_ZERO); in keydb_newsecashead() 113 p = kalloc_type(struct secashead, Z_WAITOK | Z_ZERO | Z_NOFAIL); in keydb_newsecashead() 133 p = kalloc_type(struct secreplay, Z_NOWAIT | Z_ZERO); in keydb_newsecreplay() 136 p = kalloc_type(struct secreplay, Z_WAITOK | Z_ZERO | Z_NOFAIL); in keydb_newsecreplay()
|
| /xnu-11215/tools/cocci/ |
| H A D | zalloc-zero.cocci | 16 E = kalloc_type(F, \(Z_ZERO\|Z_ZERO | ...\)); 36 E = kalloc_type(T, \(Z_WAITOK\| Z_WAITOK | ...\) 60 T V = kalloc_type(T, \(Z_ZERO\|Z_ZERO | ...\)); 67 T V = kalloc_type(T, \(Z_WAITOK\| Z_WAITOK | ...\)
|
| H A D | zalloc-nofail.cocci | 17 E = kalloc_type(F, \(Z_NOFAIL\|Z_NOFAIL | ...\)); 28 E = kalloc_type(T, \(Z_WAITOK\| Z_WAITOK | ...\) 57 T V = kalloc_type(T, \(Z_NOFAIL\|Z_NOFAIL | ...\)); 64 T V = kalloc_type(T, \(Z_WAITOK\| Z_WAITOK | ...\)
|
| H A D | zalloc.iso | 52 (T)kalloc_type(E, F) <=> kalloc_type(E, F)
|
| /xnu-11215/doc/allocators/ |
| H A D | api-basics.md | 89 In the vast majority of cases however, using `kalloc_type` (or `IOMallocType`) 97 `kalloc_type` or one of its variants (like IOKit's `IOMallocType`) and untyped 133 misuse of `kalloc_type()` relative to size at compile time, it's default in XNU. 202 <tt>kalloc_type(type_t, flags)</tt><br/> 224 <tt>kalloc_type(type_t, count, flags)</tt><br/> 236 <tt>kalloc_type(type_t, ...)</tt> (resp. <tt>IONew(type_t, 1)</tt>) 237 <b>isn't</b> equivalent to <tt>kalloc_type(type_t, 1, ...)</tt> 252 <tt>kalloc_type(hdr_type_t, type_t, count, flags)</tt><br/> 294 `operator delete` are injected that force objects to enroll into `kalloc_type`. 306 have non default structors, you will need to manually enroll it into `kalloc_type`.
|
| /xnu-11215/bsd/security/audit/ |
| H A D | audit_mac.c | 95 kalloc_type(struct mac_audit_record_list_t, Z_WAITOK); in audit_mac_new() 217 record = kalloc_type(struct mac_audit_record, Z_WAITOK | Z_NOFAIL); in audit_mac_data()
|
| /xnu-11215/bsd/vfs/ |
| H A D | vfs_init.c | 365 oidp = kalloc_type(struct sysctl_oid, Z_WAITOK); in vfsinit() 504 oidp = kalloc_type(struct sysctl_oid, Z_WAITOK); in vfstable_add() 524 allocated = kalloc_type(struct vfstable, Z_WAITOK); in vfstable_add()
|
| H A D | vfs_exclave_fs.c | 241 graft_infos = kalloc_type(fsioc_graft_info_t, alloc_count, Z_WAITOK | Z_ZERO); in get_graft_info() 337 rft = kalloc_type(registered_fs_tag_t, Z_WAITOK | Z_ZERO); in set_base_dir() 925 entry = kalloc_type(struct open_vnode, Z_WAITOK | Z_ZERO); in increment_vnode_open_count() 1049 ndp = kalloc_type(struct nameidata, Z_WAITOK); in exclave_fs_open_internal() 1065 vap = kalloc_type(struct vnode_attr, Z_WAITOK); in exclave_fs_open_internal() 1434 vap = kalloc_type(struct vnode_attr, Z_WAITOK); in vfs_exclave_fs_readdir() 1515 vap = kalloc_type(struct vnode_attr, Z_WAITOK); in vfs_exclave_fs_getsize()
|
| H A D | doc_tombstone.c | 54 ut->t_tombstone = kalloc_type(struct doc_tombstone, Z_WAITOK | Z_ZERO); in doc_tombstone_get()
|
| /xnu-11215/tests/ |
| H A D | rump.h | 8 #define kalloc_type(t, f) calloc(1, sizeof(t)) macro
|
| H A D | kalloc.c | 24 T_DECL(kalloc_type, "kalloc_type_test",
|
| /xnu-11215/iokit/Kernel/ |
| H A D | IOStatistics.cpp | 207 nextWorkLoopDependency = kalloc_type(IOWorkLoopDependency, Z_WAITOK); in initialize() 229 ke = kalloc_type(KextNode, (zalloc_flags_t)(Z_WAITOK | Z_ZERO)); in onKextLoad() 325 ce = kalloc_type(ClassNode, (zalloc_flags_t)(Z_WAITOK | Z_ZERO)); in onClassAdded() 439 counter = kalloc_type(IOEventSourceCounter, (zalloc_flags_t)(Z_WAITOK | Z_ZERO)); in registerEventSource() 502 counter = kalloc_type(IOWorkLoopCounter, (zalloc_flags_t)(Z_WAITOK | Z_ZERO)); in registerWorkLoop() 552 counter = kalloc_type(IOUserClientCounter, (zalloc_flags_t)(Z_WAITOK | Z_ZERO)); in registerUserClient() 608 nextWorkLoopDependency = kalloc_type(IOWorkLoopDependency, Z_WAITOK); in attachWorkLoopEventSource() 1182 entry = kalloc_type(IOUserClientProcessEntry, Z_WAITOK); in storeUserClientCallInfo()
|
| /xnu-11215/bsd/net/ |
| H A D | ndrv.c | 255 np = kalloc_type(struct ndrv_cb, Z_WAITOK | Z_ZERO | Z_NOFAIL); in ndrv_attach() 328 np->nd_faddr = kalloc_type(struct sockaddr_ndrv, Z_WAITOK | Z_NOFAIL | Z_ZERO); in ndrv_connect() 378 np->nd_laddr = kalloc_type(struct sockaddr_ndrv, Z_WAITOK | Z_NOFAIL | Z_ZERO); in ndrv_bind() 762 struct ifnet_demux_desc *demux_desc = kalloc_type(struct ifnet_demux_desc, in ndrv_setspec() 958 ndrv_multi = kalloc_type(struct ndrv_multiaddr, Z_WAITOK_ZERO_NOFAIL); in ndrv_do_add_multicast()
|
| H A D | init.c | 70 entry = kalloc_type(struct init_list_entry, in net_init_add()
|
| H A D | multicast_list.c | 132 mc = kalloc_type(struct multicast_entry, Z_WAITOK | Z_NOFAIL); in multicast_list_program()
|
| H A D | flowadv.c | 131 return kalloc_type(struct flowadv_fcentry, how | Z_ZERO); in flowadv_alloc_entry()
|
| /xnu-11215/bsd/kern/ |
| H A D | subr_eventhandler.c | 147 new_list = kalloc_type(struct eventhandler_list, Z_WAITOK_ZERO); in eventhandler_register_internal() 193 eg = kalloc_type(struct eventhandler_entry_generic, Z_WAITOK_ZERO); in eventhandler_register()
|
| H A D | posix_shm.c | 358 new_pinfo = kalloc_type(pshm_info_t, Z_WAITOK | Z_ZERO | Z_NOFAIL); in shm_open() 388 new_pnode = kalloc_type(pshmnode_t, Z_WAITOK | Z_ZERO); in shm_open() 623 pshmobj = kalloc_type(pshm_mobj_t, Z_WAITOK | Z_NOFAIL); in pshm_truncate() 966 name_pinfo = kalloc_type(pshm_info_t, in shm_unlink()
|
| /xnu-11215/bsd/netinet/ |
| H A D | ip_encap.c | 340 new_ep = kalloc_type(struct encaptab, Z_WAITOK | Z_ZERO | Z_NOFAIL); in encap_attach() 404 ep = kalloc_type(struct encaptab, Z_WAITOK | Z_ZERO | Z_NOFAIL); /* XXX */ in encap_attach_func() 556 tag_container = kalloc_type(struct encaptab_tag_container, wait | M_ZERO); in m_tag_kalloc_encap()
|
| /xnu-11215/bsd/skywalk/lib/ |
| H A D | net_filter_event.c | 121 nwk_wqe = kalloc_type(struct nwk_wq_entry, Z_WAITOK | Z_ZERO | Z_NOFAIL); in net_filter_event_enqueue()
|