Home
last modified time | relevance | path

Searched refs:alloc_size (Results 1 – 25 of 26) sorted by relevance

12

/xnu-11215/osfmk/arm/
H A Dio_map.c96 vm_offset_t alloc_size = round_page(size + start_offset); in io_map() local
112 phys_addr + alloc_size, prot, PMAP_MAP_BD_WCOMB); in io_map()
114 pmap_map_bd(start, phys_addr, phys_addr + alloc_size, prot); in io_map()
129 &start, alloc_size, kmaflags, VM_KERN_MEMORY_IOKIT); in io_map()
130 pmap_map(start, phys_addr, phys_addr + alloc_size, prot, flags); in io_map()
/xnu-11215/osfmk/i386/
H A Dio_map.c98 vm_offset_t alloc_size = round_page(size + start_offset); in io_map() local
110 pmap_map_bd(start, phys_addr, phys_addr + alloc_size, prot, flags); in io_map()
124 &start, alloc_size, kmaflags, VM_KERN_MEMORY_IOKIT); in io_map()
125 pmap_map(start, phys_addr, phys_addr + alloc_size, prot, flags); in io_map()
/xnu-11215/iokit/IOKit/
H A DIOLib.h124 __attribute__((alloc_size(2)))
149 void * IOMalloc(vm_size_t size) __attribute__((alloc_size(1)));
150 void * IOMallocZero(vm_size_t size) __attribute__((alloc_size(1)));
195 __attribute__((alloc_size(2)))
215 void * IOMallocAligned(vm_size_t size, vm_offset_t alignment) __attribute__((alloc_size(1)));
270 void * IOMallocPageable(vm_size_t size, vm_size_t alignment) __attribute__((alloc_size(1)));
301 void * IOMallocData(vm_size_t size) __attribute__((alloc_size(1)));
308 void * IOMallocZeroData(vm_size_t size) __attribute__((alloc_size(1)));
829 size_t alloc_size; member
843 hdr->alloc_size = __s; \
[all …]
/xnu-11215/libkern/libkern/
H A DOSMalloc.h219 OSMallocTag tag) __attribute__((alloc_size(1)));
232 OSMallocTag tag) __attribute__((alloc_size(1)));
264 OSMallocTag tag) __attribute__((alloc_size(1)));
/xnu-11215/bsd/kern/
H A Ddecmpfs.c626 kfree_data(data, alloc_size);
630 *hdr_size = alloc_size;
701 size_t alloc_size = 0;
730 kfree_data(hdr, alloc_size);
756 size_t alloc_size = 0;
918 kfree_data(hdr, alloc_size);
980 size_t alloc_size = 0;
1631 kfree_data(hdr, alloc_size);
1920 kfree_data(hdr, alloc_size);
1947 size_t alloc_size = 0;
[all …]
H A Dkern_codesigning.c60 size_t alloc_size) in code_signing_allocate() argument
64 if (alloc_size == 0) { in code_signing_allocate()
67 size_t aligned_size = round_page(alloc_size); in code_signing_allocate()
87 size_t alloc_size) in code_signing_deallocate() argument
93 } else if (alloc_size == 0) { in code_signing_deallocate()
96 size_t aligned_size = round_page(alloc_size); in code_signing_deallocate()
H A Dposix_shm.c548 mach_vm_size_t total_size, alloc_size; in pshm_truncate() local
610 for (alloc_size = 0; alloc_size < total_size; alloc_size += mosize) { in pshm_truncate()
614 mosize = MIN(total_size - alloc_size, ANON_MAX_SIZE); in pshm_truncate()
H A Dmach_loader.c787 vm_size_t alloc_size, cmds_size; in parse_machfile() local
903 round_page_overflow(cmds_size, &alloc_size) || in parse_machfile()
904 alloc_size > INT_MAX) { in parse_machfile()
911 addr = kalloc_data(alloc_size, Z_WAITOK); in parse_machfile()
919 kfree_data(addr, alloc_size); in parse_machfile()
926 kfree_data(addr, alloc_size); in parse_machfile()
1521 kfree_data(addr, alloc_size); in parse_machfile()
1563 vm_size_t alloc_size, cmds_size; in check_if_simulator_binary() local
1599 alloc_size > INT_MAX) { in check_if_simulator_binary()
1606 addr = kalloc_data(alloc_size, Z_WAITOK); in check_if_simulator_binary()
[all …]
H A Dsysv_shm.c770 mach_vm_size_t total_size, size = 0, alloc_size; in shmget_allocate_segment() local
814 for (alloc_size = 0; in shmget_allocate_segment()
815 alloc_size < total_size; in shmget_allocate_segment()
816 alloc_size += size) { in shmget_allocate_segment()
817 size = MIN(total_size - alloc_size, ANON_MAX_SIZE); in shmget_allocate_segment()
H A Dkern_exit.c907 natural_t alloc_size = BTINFO_ALLOCATION_SIZE; in current_thread_collect_backtrace_info() local
946 btdata_kernel = kalloc_data(alloc_size, Z_WAITOK | Z_ZERO); in current_thread_collect_backtrace_info()
952 kcdata = task_btinfo_alloc_init((mach_vm_address_t)btdata_kernel, alloc_size); in current_thread_collect_backtrace_info()
954 kfree_data(btdata_kernel, alloc_size); in current_thread_collect_backtrace_info()
962 kfree_data(btdata_kernel, alloc_size); in current_thread_collect_backtrace_info()
1057 kfree_data(btdata_kernel, alloc_size); in current_thread_collect_backtrace_info()
1072 kfree_data(btdata_kernel, alloc_size); in current_thread_collect_backtrace_info()
H A Duipc_mbuf.c3651 uint64_t alloc_size, kern_return_t error) in m_vm_error_stats() argument
3656 *size = alloc_size; in m_vm_error_stats()
9019 vm_size_t alloc_size = local
9023 mleak_allocations = zalloc_permanent(alloc_size, ZALIGN(struct mallocation));
/xnu-11215/tests/bounded_ptr_src/
H A Dexample.malloc.cpp55 std::uint32_t alloc_size = count * sizeof(SomeType); variable
59 array = libkern::reinterpret_pointer_cast<SomeType>(bounded_malloc(alloc_size));
/xnu-11215/tests/
H A Dmemorystatus_zone_test.c122 uint64_t alloc_size, i; in allocate_vm_stuff() local
128 alloc_size = ALLOCATION_SIZE_VM_REGION; in allocate_vm_stuff()
131 alloc_size = ALLOCATION_SIZE_VM_OBJECT; in allocate_vm_stuff()
135 printf("[%d] Allocating VM regions, each of size %lld KB%s\n", getpid(), (alloc_size >> 10), msg); in allocate_vm_stuff()
143 …if ((mach_vm_allocate(mach_task_self(), &addr, (mach_vm_size_t)alloc_size, vmflags)) != KERN_SUCCE… in allocate_vm_stuff()
153 madvise((void *)addr, (size_t)alloc_size, MADV_FREE); in allocate_vm_stuff()
168 mach_vm_deallocate(mach_task_self(), give_back[j], (mach_vm_size_t)alloc_size); in allocate_vm_stuff()
/xnu-11215/bsd/sys/
H A Dcode_signing.h144 size_t alloc_size);
152 size_t alloc_size);
H A Dcdefs.h515 #if __has_attribute(alloc_size)
516 #define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))
/xnu-11215/osfmk/kern/
H A Dkalloc.h544 vm_size_t size) __attribute__((malloc, alloc_size(1)));
550 __attribute__((malloc, alloc_size(1)))
570 __attribute__((malloc, alloc_size(3)))
1673 __attribute__((malloc, alloc_size(2)))
1733 __attribute__((malloc, alloc_size(2)))
1776 __attribute__((malloc, alloc_size(4)))
1793 __attribute__((malloc, alloc_size(4)))
H A Dkalloc.c3564 size_t alloc_size = 0, old_alloc_size = 0; in run_kalloc_test() local
3578 kheap_free(KHEAP_DATA_BUFFERS, data_ptr, alloc_size); in run_kalloc_test()
3582 alloc_size = sizeof(uint64_t) + 1; in run_kalloc_test()
3584 alloc_size, Z_WAITOK | Z_NOFAIL, NULL).addr; in run_kalloc_test()
3595 old_alloc_size = alloc_size; in run_kalloc_test()
3596 alloc_size++; in run_kalloc_test()
3612 old_alloc_size = alloc_size; in run_kalloc_test()
3613 alloc_size *= 2; in run_kalloc_test()
3629 kheap_free(KHEAP_DATA_BUFFERS, kr.addr, alloc_size); in run_kalloc_test()
3631 alloc_size = 3544; in run_kalloc_test()
[all …]
H A Dkern_cdata.c446 int alloc_size = ~31L & (31 + (items * size)); in kcdata_compress_zalloc() local
449 if ((uintptr_t) result + alloc_size > (uintptr_t) cd->kcd_cd_base + cd->kcd_cd_maxoffset) { in kcdata_compress_zalloc()
452 cd->kcd_cd_offset += alloc_size; in kcdata_compress_zalloc()
/xnu-11215/bsd/nfs/
H A Dxdr_subs.h132 void *xb_malloc(size_t) __attribute__((alloc_size(1)));
133 void *xb_realloc(void *, size_t, size_t) __attribute__((alloc_size(3)));
/xnu-11215/osfmk/vm/
H A Dvm_purgeable.c197 vm_size_t alloc_size = token_q_cur_size + PAGE_SIZE; in vm_purgeable_token_add() local
205 if (alloc_size <= TOKEN_COUNT_MAX * sizeof(struct token)) { in vm_purgeable_token_add()
207 (vm_offset_t)tokens, token_q_cur_size, alloc_size, in vm_purgeable_token_add()
226 token_q_cur_size = alloc_size; in vm_purgeable_token_add()
/xnu-11215/iokit/IOKit/pwr_mgt/
H A DIOPMPrivate.h955 uint32_t alloc_size; member
/xnu-11215/bsd/nfs/gss/
H A Dgss_krb5_mech.c581 size_t alloc_size = cchmac_di_size(cctx->di); in do_hmac_init() local
584 wctx->hmac_ctx = kalloc_data(alloc_size, Z_WAITOK | Z_ZERO); in do_hmac_init()
601 size_t alloc_size = cchmac_di_size(cctx->di); in do_hmac_destroy() local
602 kfree_data(wctx->hmac_ctx, alloc_size); in do_hmac_destroy()
/xnu-11215/iokit/Kernel/
H A DIOPMrootDomain.cpp12199 OSBoundedArrayRef<char> boundedOutBuf(outbuf, hdr->alloc_size - hdr->spindump_offset);
12576 bufSize = hdr->alloc_size;
12765 hdr->alloc_size = SWD_STACKSHOT_SIZE;
12770 …DLOG("SleepWake debug buffer size:0x%x spindump offset:0x%x\n", hdr->alloc_size, hdr->spindump_off…
12804 hdr->alloc_size = size;
/xnu-11215/bsd/net/
H A Dnecp_client.c1533 size_t alloc_size; in necp_client_update_alloc() local
1535 if (os_add_overflow(length, sizeof(*buffer), &alloc_size)) { in necp_client_update_alloc()
1538 buffer = kalloc_data(alloc_size, Z_WAITOK); in necp_client_update_alloc()
1545 client_update->update_length = alloc_size; in necp_client_update_alloc()
1547 memcpy(necp_update_get_tlv_buffer(buffer, alloc_size), data, length); in necp_client_update_alloc()
/xnu-11215/bsd/vfs/
H A Dvfs_subr.c11420 int eofflag, siz = UIO_BUFF_SIZE, alloc_size = 0, nentries = 0; in rmdir_remove_orphaned_appleDouble() local
11454 alloc_size = siz; in rmdir_remove_orphaned_appleDouble()
11627 kfree_data(rbuf, alloc_size); in rmdir_remove_orphaned_appleDouble()

12