sys: sys_delete -> calls alloc_delete

This commit is contained in:
2026-03-05 22:20:49 +00:00
parent 8231cf4e14
commit 13f3de726b
2 changed files with 6 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ typedef struct
void sys_init(sys_t *); void sys_init(sys_t *);
lisp_t *sys_alloc(sys_t *, tag_t type); lisp_t *sys_alloc(sys_t *, tag_t type);
void sys_delete(sys_t *, lisp_t *);
void sys_free(sys_t *); void sys_free(sys_t *);
// Debugging function: provides total memory usage from system. // Debugging function: provides total memory usage from system.

View File

@@ -34,6 +34,11 @@ lisp_t *sys_alloc(sys_t *sys, tag_t type)
return NIL; return NIL;
} }
void sys_delete(sys_t *sys, lisp_t *lisp)
{
alloc_delete(&sys->memory, lisp);
}
u64 sys_cost(sys_t *sys) u64 sys_cost(sys_t *sys)
{ {
return alloc_cost(&sys->memory) + sym_table_cost(&sys->symtable); return alloc_cost(&sys->memory) + sym_table_cost(&sys->symtable);