Lines Matching refs:Layout
14 use crate::alloc::{Allocator, Global, Layout};
184 let layout = match Layout::array::<T>(capacity) {
218 let layout = Layout::array::<T>(capacity).map_err(|_| CapacityOverflow)?;
272 fn current_memory(&self) -> Option<(NonNull<u8>, Layout)> {
276 // We could use Layout::array here which ensures the absence of isize and usize overflows
284 let layout = Layout::from_size_align_unchecked(size, align);
440 let new_layout = Layout::array::<T>(cap);
459 let new_layout = Layout::array::<T>(cap);
484 // `Layout::array` cannot overflow here because it would have
487 let new_layout = Layout::from_size_align_unchecked(new_size, layout.align());
504 new_layout: Result<Layout, LayoutError>,
505 current_memory: Option<(NonNull<u8>, Layout)>,