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

@ -169,7 +169,7 @@ void free_cell( struct cons_pointer pointer ) {
/* for vector space pointers, free the actual vector-space
* object. Dangerous! */
debug_printf( DEBUG_ALLOC,
L"About to free vector-space object at %ld\n",
L"About to free vector-space object at 0x%lx\n",
cell->payload.vectorp.address );
struct vector_space_object *vso = cell->payload.vectorp.address;
@ -181,7 +181,7 @@ void free_cell( struct cons_pointer pointer ) {
free( ( void * ) cell->payload.vectorp.address );
debug_printf( DEBUG_ALLOC,
L"Freed vector-space object at %ld\n",
L"Freed vector-space object at 0x%lx\n",
cell->payload.vectorp.address );
break;

View file

@ -95,7 +95,7 @@ struct cons_pointer make_exception( struct cons_pointer message,
struct cons_pointer pointer = allocate_cell( EXCEPTIONTAG );
struct cons_space_object *cell = &pointer2cell( pointer );
inc_ref( pointer ); /* this is a hack; I don't know why it's necessary to do this, but if I don't the cell gets freed */
// inc_ref( pointer ); /* this is a hack; I don't know why it's necessary to do this, but if I don't the cell gets freed */
inc_ref( message );
inc_ref( frame_pointer );