Home
last modified time | relevance | path

Searched refs:Layout (Results 1 - 8 of 8) sorted by relevance

/kernel/linux/linux-6.6/rust/alloc/
H A Dalloc.rs76 /// use std::alloc::{alloc, dealloc, handle_alloc_error, Layout};
79 /// let layout = Layout::new::<u16>();
94 pub unsafe fn alloc(layout: Layout) -> *mut u8 { in alloc()
118 pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) { in dealloc()
137 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc()
157 /// use std::alloc::{alloc_zeroed, dealloc, Layout};
160 /// let layout = Layout::new::<u16>();
171 pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 { in alloc_zeroed()
178 fn alloc_impl(&self, layout: Layout, zeroed: bool) -> Result<NonNull<[u8]>, AllocError> { in alloc_impl()
195 old_layout: Layout, in grow_impl()
[all...]
H A Draw_vec.rs14 use crate::alloc::{Allocator, Global, Layout};
184 let layout = match Layout::array::<T>(capacity) { in allocate_in()
218 let layout = Layout::array::<T>(capacity).map_err(|_| CapacityOverflow)?; in try_allocate_in()
272 fn current_memory(&self) -> Option<(NonNull<u8>, Layout)> { in current_memory()
276 // We could use Layout::array here which ensures the absence of isize and usize overflows in current_memory()
284 let layout = Layout::from_size_align_unchecked(size, align); in current_memory()
440 let new_layout = Layout::array::<T>(cap); in grow_amortized()
459 let new_layout = Layout::array::<T>(cap); in grow_exact()
484 // `Layout::array` cannot overflow here because it would have in shrink()
487 let new_layout = Layout in shrink()
[all...]
H A Dboxed.rs60 //! [`Layout`] used with the allocator is correct for the type. More precisely,
62 //! with `Layout::for_value(&*value)` may be converted into a box using
65 //! [`Global`] allocator with [`Layout::for_value(&*value)`].
145 //! [`Layout`]: crate::alloc::Layout
146 //! [`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value
172 use crate::alloc::{AllocError, Allocator, Global, Layout};
449 let layout = Layout::new::<mem::MaybeUninit<T>>(); in new_uninit_in()
489 let layout = Layout in try_new_uninit_in()
[all...]
H A Dslice.rs857 unsafe { alloc::alloc(alloc::Layout::array::<T>(len).unwrap_unchecked()) as *mut T } in stable_sort()
865 alloc::dealloc(buf_ptr as *mut u8, alloc::Layout::array::<T>(len).unwrap_unchecked()); in stable_sort()
873 alloc::alloc(alloc::Layout::array::<sort::TimSortRun>(len).unwrap_unchecked()) in stable_sort()
884 alloc::Layout::array::<sort::TimSortRun>(len).unwrap_unchecked(), in stable_sort()
/kernel/linux/linux-6.6/rust/kernel/
H A Dallocator.rs5 use core::alloc::{GlobalAlloc, Layout};
18 unsafe fn krealloc_aligned(ptr: *mut u8, new_layout: Layout, flags: bindings::gfp_t) -> *mut u8 { in krealloc_aligned()
19 // Customized layouts from `Layout::from_size_align()` can have size < align, so pad first. in krealloc_aligned()
43 unsafe fn alloc(&self, layout: Layout) -> *mut u8 { in alloc()
49 unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { in dealloc()
55 unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc()
60 let layout = unsafe { Layout::from_size_align_unchecked(new_size, layout.align()) }; in realloc()
70 unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { in alloc_zeroed()
/kernel/linux/linux-6.6/rust/alloc/collections/
H A Dmod.rs57 use crate::alloc::{Layout, LayoutError};
96 layout: Layout,
/kernel/linux/linux-5.10/drivers/scsi/mpt3sas/mpi/
H A Dmpi2_image.h295 /*FLASH Layout Extended Image Data */
342 MPI2_FLASH_LAYOUT Layout[MPI2_FLASH_NUMBER_OF_LAYOUTS]; /*0x10 */ member
/kernel/linux/linux-6.6/drivers/scsi/mpt3sas/mpi/
H A Dmpi2_image.h295 /*FLASH Layout Extended Image Data */
342 MPI2_FLASH_LAYOUT Layout[MPI2_FLASH_NUMBER_OF_LAYOUTS]; /*0x10 */ member

Completed in 8 milliseconds