mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-13 07:47:39 +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 (mark(p) == gc_color_clear) {
|
||||||
#if GC_DEBUG_PRINTFS
|
#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
|
#endif
|
||||||
mark(p) = gc_color_blue; // Needed?
|
mark(p) = gc_color_blue; // Needed?
|
||||||
// free p
|
// free p
|
||||||
|
@ -969,12 +972,14 @@ void gc_mark_black(object obj)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TODO:??? should not matter t hough?
|
case cvar_tag: {
|
||||||
maybe open this up but error out if we drop into it?
|
cvar_type *c = (cvar_type *)obj;
|
||||||
//case cvar_tag: {
|
object pvar = *(c->pvar);
|
||||||
// gc_collector_mark_gray( *(((cvar_type *)obj)->pvar) );
|
if (pvar) {
|
||||||
// break;
|
gc_collector_mark_gray(pvar);
|
||||||
//}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue