aboutsummaryrefslogtreecommitdiff
path: root/vm/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm/runtime.c')
-rw-r--r--vm/runtime.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm/runtime.c b/vm/runtime.c
index 240ba6f..3279354 100644
--- a/vm/runtime.c
+++ b/vm/runtime.c
@@ -325,6 +325,13 @@ void vm_load_registers(vm_t *vm, registers_t registers)
vm->registers = registers;
}
+void vm_stop(vm_t *vm)
+{
+ free(vm->registers.data);
+ free(vm->program.instructions);
+ free(vm->stack.data);
+}
+
void vm_print_registers(vm_t *vm, FILE *fp)
{
registers_t reg = vm->registers;