Struct solana_rbpf::memory_region::MemoryRegion [−][src]
Memory region for bounds checking and address translation
Fields
host_addr: u64
start host address
vm_addr: u64
start virtual address
len: u64
Length in bytes
vm_gap_shift: u8
Size of regular gaps as bit shift (63 means this region is continuous)
is_writable: bool
Is also writable (otherwise it is readonly)
Implementations
impl MemoryRegion
[src][−]
pub fn new_from_slice(
v: &[u8],
vm_addr: u64,
vm_gap_size: u64,
is_writable: bool
) -> Self
[src][−]
v: &[u8],
vm_addr: u64,
vm_gap_size: u64,
is_writable: bool
) -> Self
Creates a new MemoryRegion structure from a slice
pub fn vm_to_host<E: UserDefinedError>(
&self,
vm_addr: u64,
len: u64
) -> Result<u64, EbpfError<E>>
[src][−]
&self,
vm_addr: u64,
len: u64
) -> Result<u64, EbpfError<E>>
Convert a virtual machine address into a host address Does not perform a lower bounds check, as that is already done by the binary search in MemoryMapping::map()
Trait Implementations
impl Clone for MemoryRegion
[src][+]
impl Debug for MemoryRegion
[src][+]
impl Default for MemoryRegion
[src][+]
impl Eq for MemoryRegion
[src]
impl Ord for MemoryRegion
[src][+]
impl PartialEq<MemoryRegion> for MemoryRegion
[src][+]
impl PartialOrd<MemoryRegion> for MemoryRegion
[src][+]
impl StructuralEq for MemoryRegion
[src]
impl StructuralPartialEq for MemoryRegion
[src]
Auto Trait Implementations
impl RefUnwindSafe for MemoryRegion
impl Send for MemoryRegion
impl Sync for MemoryRegion
impl Unpin for MemoryRegion
impl UnwindSafe for MemoryRegion
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,