~ chicken-core (master) 199077abeead9cfaa1e0920fc0bfa4b5ac8db6cd
commit 199077abeead9cfaa1e0920fc0bfa4b5ac8db6cd
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Fri Jan 15 12:04:30 2021 +0100
Commit: Mario Domenech Goulart <mario@parenteses.org>
CommitDate: Fri Jan 15 18:28:41 2021 +0100
Fix debugging format strings and remove bogus int cast
This was found while debugging #1726; -:D would print "heap resized to
0 bytes" when the max heap size was set to 4096M.
Signed-off-by: Mario Domenech Goulart <mario@parenteses.org>
diff --git a/runtime.c b/runtime.c
index 157ae59f..51cfa7be 100644
--- a/runtime.c
+++ b/runtime.c
@@ -1269,7 +1269,7 @@ void C_set_or_change_heap_size(C_word heap, int reintern)
if(fromspace_start && heap_size >= heap) return;
if(debug_mode)
- C_dbg(C_text("debug"), C_text("heap resized to %d bytes\n"), (int)heap);
+ C_dbg(C_text("debug"), C_text("heap resized to " UWORD_COUNT_FORMAT_STRING " bytes\n"), heap);
heap_size = heap;
@@ -1306,7 +1306,7 @@ void C_do_resize_stack(C_word stack)
if(diff != 0 && !stack_size_changed) {
if(debug_mode)
- C_dbg(C_text("debug"), C_text("stack resized to %d bytes\n"), (int)stack);
+ C_dbg(C_text("debug"), C_text("stack resized to " UWORD_COUNT_FORMAT_STRING " bytes\n"), stack);
stack_size = stack;
Trap