Lines Matching full:layout
12 use core::alloc::Layout;
76 layout: Layout, in call() argument
77 old_layout: Layout, in call() argument
80 let size = layout.size(); in call()
106 crate::alloc::dangling_from_layout(layout) in call()
116 /// Returns a [`Layout`] that makes [`Kmalloc`] fulfill the requested size and alignment of
117 /// `layout`.
118 pub fn aligned_layout(layout: Layout) -> Layout { in aligned_layout() argument
119 // Note that `layout.size()` (after padding) is guaranteed to be a multiple of in aligned_layout()
120 // `layout.align()` which together with the slab guarantees means that `Kmalloc` will return in aligned_layout()
122 layout.pad_to_align() in aligned_layout()
134 layout: Layout, in realloc() argument
135 old_layout: Layout, in realloc() argument
138 let layout = Kmalloc::aligned_layout(layout); in realloc() localVariable
141 unsafe { ReallocFunc::KREALLOC.call(ptr, layout, old_layout, flags) } in realloc()
153 layout: Layout, in realloc() argument
154 old_layout: Layout, in realloc() argument
158 if layout.align() > bindings::PAGE_SIZE { in realloc()
165 unsafe { ReallocFunc::VREALLOC.call(ptr, layout, old_layout, flags) } in realloc()
177 layout: Layout, in realloc() argument
178 old_layout: Layout, in realloc() argument
182 // compatible layout. in realloc()
183 let layout = Kmalloc::aligned_layout(layout); in realloc() localVariable
186 if layout.align() > bindings::PAGE_SIZE { in realloc()
193 unsafe { ReallocFunc::KVREALLOC.call(ptr, layout, old_layout, flags) } in realloc()