mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 07:17:37 +02:00
Debugging
This commit is contained in:
parent
b4659a563a
commit
f5c60589b0
1 changed files with 12 additions and 7 deletions
19
gc.c
19
gc.c
|
@ -499,7 +499,10 @@ size_t gc_sweep(gc_heap *h, size_t *sum_freed_ptr)
|
|||
|
||||
if (mark(p) == gc_color_clear) {
|
||||
#if GC_DEBUG_PRINTFS
|
||||
fprintf(stdout, "sweep: object is not marked %p\n", p);
|
||||
//fprintf(stdout, "sweep: object is not marked %p\n", p);
|
||||
fprintf(stdout, "sweeping obj: %p ", p);
|
||||
Cyc_display(p, stdout);
|
||||
fprintf(stdout, "\n");
|
||||
#endif
|
||||
mark(p) = gc_color_blue; // Needed?
|
||||
// free p
|
||||
|
@ -969,12 +972,14 @@ void gc_mark_black(object obj)
|
|||
}
|
||||
break;
|
||||
}
|
||||
TODO:??? should not matter t hough?
|
||||
maybe open this up but error out if we drop into it?
|
||||
//case cvar_tag: {
|
||||
// gc_collector_mark_gray( *(((cvar_type *)obj)->pvar) );
|
||||
// break;
|
||||
//}
|
||||
case cvar_tag: {
|
||||
cvar_type *c = (cvar_type *)obj;
|
||||
object pvar = *(c->pvar);
|
||||
if (pvar) {
|
||||
gc_collector_mark_gray(pvar);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue