Lines Matching defs:layout

12     layout::ArrayLayout,
122 /// - `self.layout` represents the absolute number of elements that can be stored within the vector
123 /// without re-allocation. For ZSTs `self.layout`'s capacity is zero. However, it is legal for the
124 /// backing buffer to be larger than `layout`.
136 layout: ArrayLayout<T>,
211 self.layout.len()
314 // - `layout` is an empty `ArrayLayout` (zero capacity)
319 layout: ArrayLayout::empty(),
577 let layout = if Self::is_zst() {
591 layout,
664 let layout = ArrayLayout::new(new_cap).map_err(|_| AllocError)?;
669 // - `self.layout` matches the `ArrayLayout` of the preceding allocation.
673 layout.into(),
674 self.layout.into(),
681 // - `layout` is some `ArrayLayout::<T>`,
682 // - `ptr` has been created by `A::realloc` from `layout`.
684 self.layout = layout;
809 // - `self.layout` matches the `ArrayLayout` of the preceding allocation.
814 self.layout.into(),
821 self.layout = new_layout;
836 if !self.layout.is_empty() {
839 // - `self.layout` matches the `ArrayLayout` of the preceding allocation.
840 unsafe { KVmalloc::free(self.ptr.cast(), self.layout.into()) };
843 self.layout = ArrayLayout::empty();
863 // - `self.layout` matches the `ArrayLayout` of the preceding allocation.
864 unsafe { KVmalloc::free(self.ptr.cast(), self.layout.into()) };
867 self.layout = new_layout;
999 // - `self.layout` matches the `ArrayLayout` of the preceding allocation.
1000 unsafe { A::free(self.ptr.cast(), self.layout.into()) };
1218 let size = self.layout.size();
1245 layout: ArrayLayout<T>,
1258 let cap = me.layout.len();
1298 let old_layout = self.layout;
1314 // SAFETY: `len` is guaranteed to be smaller than `self.layout.len()` by the type
1316 let layout = unsafe { ArrayLayout::<T>::new_unchecked(len) };
1324 layout.into(),
1420 // - `self.layout` matches the `ArrayLayout` of the preceding allocation.
1421 unsafe { A::free(self.buf.cast(), self.layout.into()) };
1463 let layout = self.layout;
1470 layout,