Struct kvm_rs::UserMem [−][src]
pub struct UserMem { /* fields omitted */ }
Expand description
Wrapper to safely allocate memory for guest VMs.
The underlying memory is freed automatically once the UserMem
instance is dropped.
Memory can be mapped into a guest VM with
Vm::set_user_memory_region
.
Implementations
Allocate a zero-initialized memory region of len
bytes.
Allocate a zero-initialized memory region of len
bytes and initialize the first bytes
with init_from
.
Panics
Panics if init_from
is larger than the memory size len
.