From 7dbb0a625c6ac20e4d0ce85a0317c4ea496f4857 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 20 Apr 2021 17:58:55 +0000 Subject: [PATCH] chore: Better out-of-memory error --- runtime/src/memory/64bit_nix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/src/memory/64bit_nix.c b/runtime/src/memory/64bit_nix.c index 9206cf0..980aeed 100644 --- a/runtime/src/memory/64bit_nix.c +++ b/runtime/src/memory/64bit_nix.c @@ -41,7 +41,8 @@ expand_memory(void) // TODO: Refactor to return RC signifying out-of-mem to caller. Issue #96. if (map_result == MAP_FAILED) panic("Mapping of new memory failed"); if (local_sandbox_context_cache.linear_memory_size > sandbox->linear_memory_max_size) - panic("expand_memory - Out of Memory!\n"); + panic("expand_memory - Out of Memory!. %u out of %lu\n", local_sandbox_context_cache.linear_memory_size, + sandbox->linear_memory_max_size); local_sandbox_context_cache.linear_memory_size += WASM_PAGE_SIZE;