#[repr(C)]pub struct BSTScatterTableHeapAllocator { /* private fields */ }
Expand description
An allocator implementation for the BSTScatterTable.
This allocator uses the Rust standard library’s alloc
and dealloc
functions
to manage dynamic memory allocation, similar to C++’s malloc
and free
.
Implementations§
Trait Implementations§
Source§impl Allocator for BSTScatterTableHeapAllocator
impl Allocator for BSTScatterTableHeapAllocator
Source§unsafe fn allocate_zeroed(
&mut self,
layout: Layout,
) -> Result<NonNull<[u8]>, AllocError>
unsafe fn allocate_zeroed( &mut self, layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
Allocates a block of memory of the specified size in bytes.
§Panics
Panics under the following conditions.
- If
bytes_size
is not a multiple of usize.
Source§unsafe fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout)
unsafe fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout)
Deallocates a previously allocated block of memory. Read more
Source§fn get_entries(&self) -> *mut u8
fn get_entries(&self) -> *mut u8
Gets the current entries pointer.
Source§fn set_entries(&mut self, entries: *mut u8)
fn set_entries(&mut self, entries: *mut u8)
Sets the entries pointer.
Source§impl Debug for BSTScatterTableHeapAllocator
impl Debug for BSTScatterTableHeapAllocator
Auto Trait Implementations§
impl Freeze for BSTScatterTableHeapAllocator
impl RefUnwindSafe for BSTScatterTableHeapAllocator
impl !Send for BSTScatterTableHeapAllocator
impl !Sync for BSTScatterTableHeapAllocator
impl Unpin for BSTScatterTableHeapAllocator
impl UnwindSafe for BSTScatterTableHeapAllocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more