Lines Matching refs:usize
57 let (start, size) = unsafe { (HEAP.as_mut_ptr() as usize, HEAP.len()) }; in init()
65 pub fn aligned_boxed_slice(size: usize, align: usize) -> Option<Box<[u8]>> { in aligned_boxed_slice() argument
78 unsafe extern "C" fn malloc(size: usize) -> *mut c_void { in malloc()
83 unsafe extern "C" fn calloc(nmemb: usize, size: usize) -> *mut c_void { in calloc() argument
92 len: usize, in __memset_chk() argument
93 destlen: usize, in __memset_chk() argument
119 let ptr = ptr.cast::<usize>().as_ptr().offset(-1); in free()
132 fn allocate(size: usize, zeroed: bool) -> Option<NonNull<usize>> { in allocate() argument
133 let size = NonZeroUsize::new(size)?.checked_add(mem::size_of::<usize>())?; in allocate()
143 let ptr = NonNull::new(ptr)?.cast::<usize>().as_ptr(); in allocate()
155 const ALIGN: usize = const_max_size(mem::size_of::<usize>(), mem::size_of::<u64>()); in malloc_layout()
159 const fn const_max_size(a: usize, b: usize) -> usize { in const_max_size() argument