mmap

Memory-Mapped Region Utilities

Functions

FunctionDescription
_mmap_byte_atInternal byte reader.
mmap_region_newCreate a new memory region of at least size bytes.
mmap_read_byteRead a byte at the given offset.
mmap_write_byteWrite a byte at the given offset.
mmap_read_i64Read an i64 at the given byte offset (must be 8-byte aligned).
mmap_write_i64Write an i64 at the given byte offset (must be 8-byte aligned).
mmap_fillFill len bytes starting at off with value val.
mmap_region_sizeReturn the size of the region.

Details

_mmap_byte_at

fn _mmap_byte_at(buf: &i8, idx: i64) -> i64

Internal byte reader.

mmap_region_new

fn mmap_region_new(size: i64) -> &i64

Create a new memory region of at least size bytes.

mmap_read_byte

fn mmap_read_byte(h: &i64, off: i64) -> i64

Read a byte at the given offset.

mmap_write_byte

fn mmap_write_byte(h: &i64, off: i64, val: i64) -> i64

Write a byte at the given offset.

mmap_read_i64

fn mmap_read_i64(h: &i64, off: i64) -> i64

Read an i64 at the given byte offset (must be 8-byte aligned).

mmap_write_i64

fn mmap_write_i64(h: &i64, off: i64, val: i64) -> i64

Write an i64 at the given byte offset (must be 8-byte aligned).

mmap_fill

fn mmap_fill(h: &i64, off: i64, len: i64, val: i64) -> i64

Fill len bytes starting at off with value val.

mmap_region_size

fn mmap_region_size(h: &i64) -> i64

Return the size of the region.