A helper function that executes a closure with the memory manager.
(f: impl FnOnce(&MemoryManager<Memory>) -> R)
| 45 | |
| 46 | /// A helper function that executes a closure with the memory manager. |
| 47 | pub fn with_memory_manager<R>(f: impl FnOnce(&MemoryManager<Memory>) -> R) -> R { |
| 48 | MEMORY_MANAGER.with(|cell| f(&cell.borrow())) |
| 49 | } |
| 50 | |
| 51 | /// Reserve the first stable memory page for the configuration stable cell. |
| 52 | pub fn system_state_memory() -> Memory { |
no outgoing calls
no test coverage detected