Home
last modified time | relevance | path

Searched refs:Layout (Results 1 – 10 of 10) sorted by relevance

/DragonOS/kernel/src/mm/allocator/
H A Dkernel_allocator.rs11 alloc::{AllocError, GlobalAlloc, Layout},
24 unsafe fn local_alloc(&self, layout: Layout) -> *mut u8; in local_alloc()
25 unsafe fn local_alloc_zeroed(&self, layout: Layout) -> *mut u8; in local_alloc_zeroed()
26 unsafe fn local_dealloc(&self, ptr: *mut u8, layout: Layout); in local_dealloc() argument
32 unsafe fn alloc_in_buddy(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> { in alloc_in_buddy()
54 unsafe fn free_in_buddy(&self, ptr: *mut u8, layout: Layout) { in free_in_buddy() argument
65 unsafe fn local_alloc(&self, layout: Layout) -> *mut u8 { in local_alloc()
79 unsafe fn local_alloc_zeroed(&self, layout: Layout) -> *mut u8 { in local_alloc_zeroed()
97 unsafe fn local_dealloc(&self, ptr: *mut u8, layout: Layout) { in local_dealloc() argument
108 unsafe fn alloc(&self, layout: Layout) -> *mut u8 { in alloc()
[all …]
H A Dslab.rs1 use core::{alloc::Layout, ptr::NonNull, sync::atomic::AtomicBool};
29 pub(crate) unsafe fn allocate(&mut self, layout: Layout) -> *mut u8 { in allocate()
51 layout: Layout, in deallocate() argument
/DragonOS/kernel/crates/rust-slabmalloc/src/
H A Dlib.rs38 use core::alloc::Layout;
67 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError>; in allocate()
68 fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError>; in deallocate()
76 layout: Layout, in refill() argument
H A Dsc.rs187 fn try_allocate_from_pagelist(&mut self, sc_layout: Layout) -> *mut u8 { in try_allocate_from_pagelist()
253 pub fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate()
261 let new_layout = unsafe { Layout::from_size_align_unchecked(self.size, layout.align()) }; in allocate()
307 pub fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate()
323 let new_layout = unsafe { Layout::from_size_align_unchecked(self.size, layout.align()) }; in deallocate()
H A Dzone.rs168 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate()
181 fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate()
194 layout: Layout, in refill() argument
H A Dpages.rs15 layout: Layout, in first_fit() argument
59 layout: Layout, in first_fit() argument
171 fn get_offset_for_align(layout: Layout) -> usize { in get_offset_for_align()
210 fn first_fit(&self, layout: Layout) -> Option<(usize, usize)> { in first_fit()
218 fn allocate(&mut self, layout: Layout) -> *mut u8 { in allocate()
239 fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate()
/DragonOS/tools/debugging/logmonitor/src/
H A Dui.rs2 prelude::{Constraint, Layout, Rect},
38 let chunks = Layout::default() in render()
60 let chunks = Layout::default() in draw_first_tab()
74 let chunks = Layout::default() in draw_memory_logging_speed_gauges()
/DragonOS/kernel/src/libs/
H A Dalign.rs23 const LAYOUT: core::alloc::Layout = {
31 let layout = core::alloc::Layout::from_size_align(
/DragonOS/kernel/crates/klog_types/src/
H A Dlib.rs130 pub layout: core::alloc::Layout,
136 pub fn new(layout: core::alloc::Layout, vaddr: Option<usize>, paddr: Option<usize>) -> Self { in new() argument
/DragonOS/kernel/src/mm/
H A Dfault.rs2 alloc::Layout,
249 Layout::from_size_align(MMArch::PAGE_SIZE, MMArch::PAGE_SIZE).unwrap(), in do_anonymous_page()