MCPcopy Create free account
hub / github.com/bytecodealliance/WASI-Virt / stack_bytes

Method stack_bytes

src/data.rs:82–85  ·  view source on GitHub ↗
(&mut self, bytes: &[u8])

Source from the content-addressed store, hash-verified

80 }
81
82 pub fn stack_bytes(&mut self, bytes: &[u8]) -> Result<u32> {
83 self.stack_alloc(bytes.len(), 1)?.copy_from_slice(bytes);
84 Ok(self.stack_ptr as u32)
85 }
86
87 /// Allocate some bytes into the data section, return the pointer
88 /// Note this is only safe for T being repr(C) / packed

Callers 1

create_io_virtFunction · 0.80

Calls 1

stack_allocMethod · 0.80

Tested by

no test coverage detected