MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / checked_end

Method checked_end

crates/tinywasm/src/store/memory/paged.rs:74–80  ·  view source on GitHub ↗
(&self, addr: usize, len: usize)

Source from the content-addressed store, hash-verified

72
73 #[inline(always)]
74 fn checked_end(&self, addr: usize, len: usize) -> Option<usize> {
75 let end = addr.checked_add(len)?;
76 if end > self.len {
77 return None;
78 }
79 Some(end)
80 }
81
82 #[inline(always)]
83 fn copy_within_single_chunk(&mut self, dst: usize, src: usize, len: usize) -> bool {

Callers 4

write_allMethod · 0.80
fillMethod · 0.80
copy_withinMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected