pub struct CodeAllocator {
pub context: *mut c_void,
pub create_block_unwind_info: Option<unsafe extern "C" fn(context: *mut c_void, block: *mut u8, block_size: usize, start_offset: &mut usize) -> *mut c_void>,
pub destroy_block_unwind_info: Option<unsafe extern "C" fn(context: *mut c_void, unwind_data: *mut c_void)>,
/* private fields */
}Fields§
§context: *mut c_void§create_block_unwind_info: Option<unsafe extern "C" fn(context: *mut c_void, block: *mut u8, block_size: usize, start_offset: &mut usize) -> *mut c_void>§destroy_block_unwind_info: Option<unsafe extern "C" fn(context: *mut c_void, unwind_data: *mut c_void)>Implementations§
Source§impl CodeAllocator
impl CodeAllocator
pub fn align_to_page_size(size: usize) -> usize
Source§impl CodeAllocator
impl CodeAllocator
Source§impl CodeAllocator
impl CodeAllocator
Source§impl CodeAllocator
impl CodeAllocator
pub fn allocate_new_block(&mut self, unwind_info_size: &mut usize) -> bool
Source§impl CodeAllocator
impl CodeAllocator
pub fn allocate_pages(&self, size: usize) -> *mut u8
Source§impl CodeAllocator
impl CodeAllocator
pub fn code_allocator_usize_usize( &mut self, block_size: usize, max_total_size: usize, )
Source§impl CodeAllocator
impl CodeAllocator
pub fn code_allocator_usize_usize_allocation_callback_void( &mut self, block_size: usize, max_total_size: usize, allocation_callback: Option<AllocationCallback>, allocation_callback_context: *mut c_void, )
Source§impl CodeAllocator
impl CodeAllocator
Source§impl CodeAllocator
impl CodeAllocator
pub fn deallocate(&mut self, code_allocation_data: CodeAllocationData)
Source§impl CodeAllocator
impl CodeAllocator
pub fn free_pages(&self, mem: *mut u8, size: usize)
Trait Implementations§
Source§impl Debug for CodeAllocator
impl Debug for CodeAllocator
Source§impl Default for CodeAllocator
impl Default for CodeAllocator
Source§impl Drop for CodeAllocator
impl Drop for CodeAllocator
Auto Trait Implementations§
impl !Send for CodeAllocator
impl !Sync for CodeAllocator
impl Freeze for CodeAllocator
impl RefUnwindSafe for CodeAllocator
impl Unpin for CodeAllocator
impl UnsafeUnpin for CodeAllocator
impl UnwindSafe for CodeAllocator
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