diff options
author | ubq323 <ubq323@ubq323.website> | 2023-08-04 22:38:48 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-08-04 22:38:48 +0100 |
commit | f67a3fd05c1b2fe8c749fc2f58287b1b14b011d8 (patch) | |
tree | 5566db459c3414ad1c9c18bcc61a21e0ab034f37 /vm.c | |
parent | 7c9790d7726e0bb3f44bec15eff7631080d45b03 (diff) |
move M to its own file
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -6,22 +6,9 @@ #include "val.h" #include "vm.h" +#include "mem.h" #include "dis.h" -void *M(void *p, size_t sz) { - if (sz == 0) { - free(p); - return NULL; - } else { - void *x = realloc(p, sz); - if (x == NULL) { - printf("out of memory! aaaaaaa!!!!!\n"); - exit(42); - } - return x; - } -} - Chunk chunk_new() { return (Chunk){ |