lisp: split memory into conses and vectors
During garbage collection, we'll iterate through these two vectors. Instead of freeing the memory, we can swap cells in the vector and decrement its size. The idea is we can attach an allocator to the system where we reuse memory instead of just allocating everytime.
This commit is contained in:
@@ -26,7 +26,8 @@ typedef struct
|
||||
/// System context
|
||||
typedef struct
|
||||
{
|
||||
vec_t memory;
|
||||
vec_t conses;
|
||||
vec_t vectors;
|
||||
sym_table_t symtable;
|
||||
} sys_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user