mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
More debugging
This commit is contained in:
parent
e95eeb8732
commit
a257423999
1 changed files with 3 additions and 3 deletions
6
gc.c
6
gc.c
|
@ -342,9 +342,9 @@ void *gc_alloc(gc_heap *h, size_t size, char *obj, gc_thread_data *thd, int *hea
|
||||||
exit(1); // TODO: throw error???
|
exit(1); // TODO: throw error???
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if GC_DEBUG_PRINTFS
|
//#if GC_DEBUG_PRINTFS
|
||||||
fprintf(stdout, "alloc %p size = %d\n", result, size);
|
fprintf(stdout, "alloc %p size = %d\n", result, size);
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
// TODO: Debug check, remove (ifdef it) once GC is stabilized
|
// TODO: Debug check, remove (ifdef it) once GC is stabilized
|
||||||
if (is_value_type(result)) {
|
if (is_value_type(result)) {
|
||||||
|
@ -511,7 +511,7 @@ 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, "sweep is freeing obj: %p with tag %d\n", p, type_of(p));
|
fprintf(stdout, "sweep is freeing obj: %p with tag %ld\n", p, type_of(p));
|
||||||
//#endif
|
//#endif
|
||||||
mark(p) = gc_color_blue; // Needed?
|
mark(p) = gc_color_blue; // Needed?
|
||||||
// free p
|
// free p
|
||||||
|
|
Loading…
Add table
Reference in a new issue