Skip to content

Commit 0aa3f86

Browse files
committed
feat: add narrow shared memory accessor to UninitializedSandbox
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent 4f8cae8 commit 0aa3f86

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/hyperlight_host/src/sandbox/uninitialized.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ impl<'a> From<GuestBinary<'a>> for GuestEnvironment<'a, '_> {
161161
}
162162

163163
impl UninitializedSandbox {
164+
/// Returns a mutable reference to the sandbox's shared memory region.
165+
pub fn shared_mem_mut(&mut self) -> &mut ExclusiveSharedMemory {
166+
&mut self.mgr.shared_mem
167+
}
168+
164169
// Creates a new uninitialized sandbox from a pre-built snapshot.
165170
// Note that since memory configuration is part of the snapshot the only configuration
166171
// that can be changed (from the original snapshot) is the configuration defines the behaviour of

0 commit comments

Comments
 (0)