Struct Chunk
pub struct Chunk { /* private fields */ }Expand description
Represents a contiguous chunk of memory allocated or inspected by the runtime.
Implementations§
§impl Chunk
impl Chunk
pub fn permissions(&self) -> Perm
pub fn permissions(&self) -> Perm
Returns the current permissions of the memory chunk.
pub fn page_start(&self) -> u64
pub fn page_start(&self) -> u64
Returns the address of the start of the page containing this chunk.
pub fn change_permissions(&mut self, perm: Perm)
pub fn change_permissions(&mut self, perm: Perm)
Changes the permissions of the memory chunk.
pub fn make_x(&mut self)
pub fn make_x(&mut self)
Sets the permissions to Execute only.
pub fn make_rw(&mut self)
pub fn make_rw(&mut self)
Sets the permissions to Read and Write.
pub fn make_rx(&mut self)
pub fn make_rx(&mut self)
Sets the permissions to Read and Execute.
pub fn make_rwx(&mut self)
pub fn make_rwx(&mut self)
Sets the permissions to Read, Write, and Execute.
pub fn make_ro(&mut self)
pub fn make_ro(&mut self)
Sets the permissions to Read Only.
pub fn cache_flush(&mut self)
pub fn cache_flush(&mut self)
Flushes the instruction cache for this memory chunk. This should be used when modifying code in memory (e.g., hooking, JIT).
pub fn is_valid(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl !Send for Chunk
impl !Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
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