/DragonOS/kernel/src/mm/allocator/ |
H A D | kernel_allocator.rs | 11 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 pub(super) 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 D | slab.rs | 1 use core::{alloc::Layout, ptr::NonNull, sync::atomic::AtomicBool}; 33 pub(crate) unsafe fn allocate(&mut self, layout: Layout) -> *mut u8 { in allocate() 55 layout: Layout, in deallocate() argument 94 KERNEL_ALLOCATOR.free_in_buddy(base_addr, Layout::from_size_align_unchecked(size, 1)); in free_slab_page()
|
/DragonOS/kernel/crates/rust-slabmalloc/src/ |
H A D | lib.rs | 36 use core::alloc::Layout; 65 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError>; in allocate() 71 layout: Layout, in deallocate() argument 81 layout: Layout, in refill() argument
|
H A D | sc.rs | 195 fn try_allocate_from_pagelist(&mut self, sc_layout: Layout) -> *mut u8 { in try_allocate_from_pagelist() 262 pub fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate() 270 let new_layout = unsafe { Layout::from_size_align_unchecked(self.size, layout.align()) }; in allocate() 323 layout: Layout, in deallocate() argument 341 let new_layout = unsafe { Layout::from_size_align_unchecked(self.size, layout.align()) }; in deallocate()
|
H A D | zone.rs | 159 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate() 176 layout: Layout, in deallocate() argument 191 layout: Layout, in refill() argument
|
H A D | pages.rs | 15 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 D | ui.rs | 2 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 D | align.rs | 23 const LAYOUT: core::alloc::Layout = { 31 let layout = core::alloc::Layout::from_size_align(
|
/DragonOS/kernel/crates/klog_types/src/ |
H A D | lib.rs | 129 pub layout: core::alloc::Layout, 135 pub fn new(layout: core::alloc::Layout, vaddr: Option<usize>, paddr: Option<usize>) -> Self { in new() argument
|
/DragonOS/kernel/src/mm/ |
H A D | fault.rs | 2 alloc::Layout, 249 Layout::from_size_align(MMArch::PAGE_SIZE, MMArch::PAGE_SIZE).unwrap(), in do_anonymous_page()
|