aboutsummaryrefslogtreecommitdiff
path: root/gc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gc.cpp')
-rw-r--r--gc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/gc.cpp b/gc.cpp
index 3fa1402..6db85fa 100644
--- a/gc.cpp
+++ b/gc.cpp
@@ -48,7 +48,7 @@ void GarbageCollector::force() {
} // fetch the pending pointers in the list
// clear the list
pending_list = NULL; */
- fprintf(stderr, "%d\n", mapping.size());
+ fprintf(stderr, "%ld\n", mapping.size());
for (EvalObj2Int::iterator it = mapping.begin();
it != mapping.end(); it++)
if (it->second == 0) *r++ = it->first;
@@ -86,10 +86,12 @@ void GarbageCollector::force() {
fprintf(stderr, "GC: Forced clear, %lu objects are freed, "
"%lu remains\n"
"=============================\n", cnt, mapping.size());
-/* for (EvalObj2Int::iterator it = mapping.begin();
+
+#endif
+#ifdef GC_DEBUG
+ for (EvalObj2Int::iterator it = mapping.begin();
it != mapping.end(); it++)
- fprintf(stderr, "%llx => %lu\n", (ull)it->first, it->second);
- */
+ fprintf(stderr, "%llx => %s\n", (ull)it->first, it->first->ext_repr().c_str());
#endif
collecting = false;
}