on master help sign in
Fixed idris_gcInfo so it uses correct printf format strings / correct sizes.
commitd1e0d004abb2508b0320d5a4c3485b9ab359f216 authorCalvin Beck <hobbes@ualberta.ca> dateWed 25 Feb 2015, 13:48 (12 years ago) parentb32de5c
1 file changed+4−4
rts/idris_gc.c+4−4
rts/idris_gc.c+4−4
@@ -162,13 +162,13 @@ void idris_gc(VM* vm) {
162162
163163void idris_gcInfo(VM* vm, int doGC) {
164164 printf("Stack: <BOT %p> <TOP %p>\n", vm->valstack, vm->valstack_top);
165− printf("Final heap size %d\n", (int)(vm->heap.size));
166− printf("Final heap use %d\n", (int)(vm->heap.next - vm->heap.heap));
165+ printf("Final heap size %zd\n", vm->heap.size);
166+ printf("Final heap use %zd\n", vm->heap.next - vm->heap.heap);
167167 if (doGC) { idris_gc(vm); }
168− printf("Final heap use after GC %d\n", (int)(vm->heap.next - vm->heap.heap));
168+ printf("Final heap use after GC %zd\n", vm->heap.next - vm->heap.heap);
169169#ifdef IDRIS_ENABLE_STATS
170170 printf("Total allocations %" PRIu64 "\n", vm->stats.allocations);
171171#endif
172− printf("Number of collections %d\n", vm->stats.collections);
172+ printf("Number of collections %" PRIu32 "\n", vm->stats.collections);
173173
174174}