diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-01 20:08:40 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-01 20:08:40 +0000 |
commit | 0f295221cac3cfe507cafa6cbf012c51537ce1c8 (patch) | |
tree | 13e7aa6767a8774b4fcf1f5d2b3e7547fb5f551c /vm/runtime.h | |
parent | 525694bea7724d612a8b742943a0ed2aed5822f8 (diff) | |
download | ovm-0f295221cac3cfe507cafa6cbf012c51537ce1c8.tar.gz ovm-0f295221cac3cfe507cafa6cbf012c51537ce1c8.tar.bz2 ovm-0f295221cac3cfe507cafa6cbf012c51537ce1c8.zip |
VM runtime now maintains a heap internally
Now need to create some instructions which manage the heap
Diffstat (limited to 'vm/runtime.h')
-rw-r--r-- | vm/runtime.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vm/runtime.h b/vm/runtime.h index 45d467d..6c6042a 100644 --- a/vm/runtime.h +++ b/vm/runtime.h @@ -16,6 +16,7 @@ #include <stdio.h> #include <stdlib.h> +#include <lib/heap.h> #include <lib/inst.h> typedef enum @@ -45,6 +46,7 @@ typedef struct byte *data; word ptr, max; } stack; + heap_t heap; struct Program { inst_t *instructions; @@ -56,8 +58,9 @@ err_t vm_execute(vm_t *); err_t vm_execute_all(vm_t *); void vm_load_stack(vm_t *, byte *, size_t); -void vm_load_program(vm_t *, inst_t *, size_t); void vm_load_registers(vm_t *, registers_t); +void vm_load_heap(vm_t *, heap_t); +void vm_load_program(vm_t *, inst_t *, size_t); void vm_stop(vm_t *); // Print routines |