Skip to content

Advanced Stack & Memory Management

These instructions manage the evaluation stack's memory footprint and capacity. They provide fine-grained control over resource allocation, helping to optimize performance and prevent memory fragmentation within the virtual machine.

OpcodeArgumentsOperands (stack)Description
init_stacksize-Initialize the evaluation stack memory capacity at the beginning of VM execution to prevent reallocation
shrink-target, lengthReduces the capacity of the stack to fit its current length
truncate-target_sizeClear/reset the stack elements efficiently

Released under the Apache-2.0 License.