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

Function consume_some_stack

tests/all/stack_overflow.rs:114–120  ·  view source on GitHub ↗
(ptr: usize, stack: usize)

Source from the content-addressed store, hash-verified

112
113 #[inline(never)]
114 fn consume_some_stack(ptr: usize, stack: usize) -> usize {
115 if stack == 0 {
116 return ptr;
117 }
118 let mut space = [0u8; 1024];
119 consume_some_stack(space.as_mut_ptr() as usize, stack.saturating_sub(1024))
120 }
121}
122
123#[wasmtime_test]

Callers

nothing calls this directly

Calls 2

saturating_subMethod · 0.80
as_mut_ptrMethod · 0.45

Tested by

no test coverage detected