diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2023-02-11 21:31:04 -0800 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2023-02-11 21:31:04 -0800 |
| commit | 5989629a7951e544ad4656672025a99ecd08c7c9 (patch) | |
| tree | 89e2ca80f73d8dcf16a9fadcea41b2e141bdf4eb /bytecode/heap.h | |
| parent | aafc502de6f9ecbeb4638b1862f4fa5ac82199d7 (diff) | |
| download | sml-5989629a7951e544ad4656672025a99ecd08c7c9.tar.zst | |
Change how slices work.
I'm switching to a more macro-heavy solution. Hopefully it
proves robust.
Diffstat (limited to 'bytecode/heap.h')
| -rw-r--r-- | bytecode/heap.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bytecode/heap.h b/bytecode/heap.h index c8d7e2c..c6c10c4 100644 --- a/bytecode/heap.h +++ b/bytecode/heap.h @@ -4,24 +4,24 @@ #include <stddef.h> #include <stdint.h> -#include "slice.h" #include "value.h" +#include "value_slice.h" struct heap { // The heap is divided into two halves for garbage collection. // buf holds the malloc'd heap buffer. value *buf; // active and standby are slices that partition buf. - struct val_slice active; - struct val_slice standby; + value_slice active; + value_slice standby; size_t free_ptr; size_t last_free; - struct val_slice gc_roots; + value_slice gc_roots; }; -struct heap new_heap(struct val_slice); +struct heap new_heap(value_slice); value *alloc(struct heap *, int64_t); #endif |
