MCPcopy Create free account
hub / github.com/PLSysSec/wave / fits_in_lin_mem

Method fits_in_lin_mem

src/runtime.rs:92–98  ·  view source on GitHub ↗
(&self, buf: SboxPtr, cnt: u32)

Source from the content-addressed store, hash-verified

90 // (cnt as usize) < self.memlen
91 )]
92 pub fn fits_in_lin_mem(&self, buf: SboxPtr, cnt: u32) -> bool {
93 let total_size = (buf as usize) + (cnt as usize);
94 if total_size >= self.memlen || total_size >= LINEAR_MEM_SIZE {
95 return false;
96 }
97 self.in_lin_mem(buf) && self.in_lin_mem(cnt) && buf <= buf + cnt
98 }
99
100 #[pure]
101 #[with_ghost_var(trace: &Trace)]

Callers 14

copy_buf_to_sandboxMethod · 0.80
translate_pathMethod · 0.80
wasi_prestat_dirnameFunction · 0.80
wasi_path_readlinkFunction · 0.80
wasi_random_getFunction · 0.80
wasi_sock_recvFunction · 0.80
wasi_sock_sendFunction · 0.80

Calls 1

in_lin_memMethod · 0.80

Tested by

no test coverage detected