Lines Matching refs:layout
126 fn alloc(&mut self, mut header: VMGcHeader, layout: Layout) -> Result<Result<VMGcRef, u64>> { in alloc()
127 debug_assert!(layout.size() >= core::mem::size_of::<VMGcHeader>()); in alloc()
128 debug_assert!(layout.align() >= core::mem::align_of::<VMGcHeader>()); in alloc()
132 let size = match u32::try_from(layout.size()).ok().and_then(|size| { in alloc()
146 let aligned = match u32::try_from(layout.align()) in alloc()
162 return Ok(Err(u64::try_from(layout.size()).unwrap())); in alloc()
285 fn alloc_raw(&mut self, header: VMGcHeader, layout: Layout) -> Result<Result<VMGcRef, u64>> { in alloc_raw()
286 self.alloc(header, layout) in alloc_raw()
292 layout: &GcStructLayout, in alloc_uninit_struct_or_exn()
294 let kind = if layout.is_exception { in alloc_uninit_struct_or_exn()
299 self.alloc(VMGcHeader::from_kind_and_index(kind, ty), layout.layout()) in alloc_uninit_struct_or_exn()
308 layout: &GcArrayLayout, in alloc_uninit_array()
312 layout.layout(length), in alloc_uninit_array()