configurable stack and heap memory size (#288)

- Allow configuration of the maximum heap and stack size via CLI flags
and JSON input settings.
- Increase the default value for the stack size to 32kb.

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus
2025-04-24 10:47:38 +02:00
committed by GitHub
parent 357bf58868
commit 20e77cb0b5
16 changed files with 128 additions and 21 deletions
@@ -38,7 +38,9 @@ impl Entry {
context.xlen_type().const_zero(),
);
let heap_memory_type = context.byte_type().array_type(context.heap_size);
let heap_memory_type = context
.byte_type()
.array_type(context.memory_config.heap_size);
context.set_global(
crate::polkavm::GLOBAL_HEAP_MEMORY,
heap_memory_type,