Move heap management code into heap.c

This commit is contained in:
Nunuhara Cabbage
2019-12-23 16:53:00 -08:00
parent 9bb1d0ec0b
commit eb8c7b0fe6
12 changed files with 219 additions and 164 deletions
+3 -2
View File
@@ -17,9 +17,10 @@
#include <stdio.h>
#include <chibi/eval.h>
#include "vm.h"
#include "heap.h"
#include "page.h"
#include "utfsjis.h"
#include "vm.h"
struct variable {
enum ain_data_type data_type;
@@ -49,7 +50,7 @@ static struct page *get_page(int pageno)
{
if (!page_index_valid(pageno))
return NULL;
return vm_get_page(pageno);
return heap_get_page(pageno);
}
static struct variable *get_global_by_name(const char *name)