(&self, store: &mut Store, len: i32)
| 2906 | } |
| 2907 | |
| 2908 | fn allocate(&self, store: &mut Store, len: i32) -> Result<i32> { |
| 2909 | let ptr = self |
| 2910 | .malloc |
| 2911 | .call(&mut *store, len) |
| 2912 | .context("malloc guest allocation")?; |
| 2913 | ensure!(ptr > 0, "malloc returned null for guest allocation"); |
| 2914 | #[cfg(debug_assertions)] |
| 2915 | self.allocations.set(self.allocations.get() + 1); |
| 2916 | Ok(ptr) |
| 2917 | } |
| 2918 | |
| 2919 | fn run_and_free<R>( |
| 2920 | &self, |
no test coverage detected