Struct assembler::ExecutableAnonymousMemoryMap
source · pub struct ExecutableAnonymousMemoryMap { /* private fields */ }
Expand description
Represents an executable memory map that can be used to generate program code into.
Implementations
sourceimpl ExecutableAnonymousMemoryMap
impl ExecutableAnonymousMemoryMap
sourcepub fn new(length: usize, allocate_in_first_2Gb: bool) -> Result<Self>
pub fn new(length: usize, allocate_in_first_2Gb: bool) -> Result<Self>
Create a new instance.
length
is rounded up to the nearest power of two, and is floored at the smallest page size (4Kb).
Memory is created using an anonymous, shared mmap with no access rights (not even read) which is then locked (mlock
’d).
sourcepub fn instruction_stream(
&mut self,
instruction_stream_hints: &InstructionStreamHints
) -> InstructionStream<'_>
pub fn instruction_stream(
&mut self,
instruction_stream_hints: &InstructionStreamHints
) -> InstructionStream<'_>
Get an assembler to this anonymous map.
Trait Implementations
sourceimpl Debug for ExecutableAnonymousMemoryMap
impl Debug for ExecutableAnonymousMemoryMap
Auto Trait Implementations
impl RefUnwindSafe for ExecutableAnonymousMemoryMap
impl !Send for ExecutableAnonymousMemoryMap
impl !Sync for ExecutableAnonymousMemoryMap
impl Unpin for ExecutableAnonymousMemoryMap
impl UnwindSafe for ExecutableAnonymousMemoryMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more