From db0d714eba8311b5d22f81a3097fcd076826c53f Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 5 Jul 2008 03:07:34 -0500 Subject: [PATCH] Output relocation data size --- vm/code_gc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vm/code_gc.c b/vm/code_gc.c index e0abdc5a61..03661999c5 100755 --- a/vm/code_gc.c +++ b/vm/code_gc.c @@ -308,6 +308,8 @@ DEFINE_PRIMITIVE(code_room) /* Dump all code blocks for debugging */ void dump_heap(F_HEAP *heap) { + CELL size = 0; + F_BLOCK *scan = first_block(heap); while(scan) @@ -319,9 +321,11 @@ void dump_heap(F_HEAP *heap) status = "free"; break; case B_ALLOCATED: + size += object_size(block_to_compiled(scan)->relocation); status = "allocated"; break; case B_MARKED: + size += object_size(block_to_compiled(scan)->relocation); status = "marked"; break; default: @@ -333,6 +337,8 @@ void dump_heap(F_HEAP *heap) scan = next_block(heap,scan); } + + printf("%ld bytes of relocation data\n",size); } /* Compute where each block is going to go, after compaction */