MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / get_memory

Method get_memory

crates/fuzzing/src/oracles/diff_wasmtime.rs:187–201  ·  view source on GitHub ↗
(&mut self, name: &str, shared: bool)

Source from the content-addressed store, hash-verified

185 }
186
187 fn get_memory(&mut self, name: &str, shared: bool) -> Option<Vec<u8>> {
188 Some(if shared {
189 let memory = self
190 .instance
191 .get_shared_memory(&mut self.store, name)
192 .unwrap();
193 memory.data().iter().map(|i| unsafe { *i.get() }).collect()
194 } else {
195 self.instance
196 .get_memory(&mut self.store, name)
197 .unwrap()
198 .data(&self.store)
199 .to_vec()
200 })
201 }
202}
203
204impl From<&DiffValue> for Val {

Callers

nothing calls this directly

Calls 8

get_shared_memoryMethod · 0.80
collectMethod · 0.80
unwrapMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
dataMethod · 0.45
getMethod · 0.45
to_vecMethod · 0.45

Tested by

no test coverage detected