Garbage collection now much better, not good

There's clearly still a lot of things getting incremented but not decremented.
This commit is contained in:
Simon Brooke 2018-12-29 09:35:29 +00:00
parent ad806de656
commit 7b126ea979
7 changed files with 39 additions and 6 deletions

View file

@ -133,8 +133,18 @@ int main( int argc, char *argv[] ) {
bind_special( L"quote", &lisp_quote );
bind_special( L"set!", &lisp_set_shriek );
debug_print(L"Initialised oblist\n", DEBUG_BOOTSTRAP);
debug_dump_object(oblist, DEBUG_BOOTSTRAP);
repl( stdin, stdout, stderr, show_prompt );
debug_print(L"Freeing oblist\n", DEBUG_BOOTSTRAP);
debug_printf(DEBUG_BOOTSTRAP, L"Oblist has %u references\n", pointer2cell(oblist).count);
debug_dump_object(oblist, DEBUG_BOOTSTRAP);
dec_ref(oblist);
debug_dump_object(oblist, DEBUG_BOOTSTRAP);
if ( dump_at_end ) {
dump_pages( stdout );
}