MemoryAllocatePid

Trait MemoryAllocatePid 

Source
pub trait MemoryAllocatePid: GetContext {
    // Required methods
    fn allocate_pid(
        &self,
        pid: &Self::Context,
        size: u64,
        protection: MemoryProtection,
    ) -> Result<u64, MemoryAllocateError>;
    fn free_pid(
        &self,
        pid: &Self::Context,
        base: u64,
        size: u64,
    ) -> Result<(), MemoryAllocateError>;
}

Required Methods§

Source

fn allocate_pid( &self, pid: &Self::Context, size: u64, protection: MemoryProtection, ) -> Result<u64, MemoryAllocateError>

Allocates size bytes of memory in the process with the specified protection. Returns the allocated memory or an error.

Source

fn free_pid( &self, pid: &Self::Context, base: u64, size: u64, ) -> Result<(), MemoryAllocateError>

Frees allocated memory at the specified address and size.

Implementors§