shithub: sl

Download patch

ref: 7de6b74a4cca7a1519df57903f194edfb655b706
parent: fa99106e2b966e20e12e9dccc987c0dbd77a3e96
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Feb 5 13:06:19 EST 2025

vm-stats: specify units for heap and stack sizes

--- a/src/flisp.c
+++ b/src/flisp.c
@@ -1254,10 +1254,10 @@
 {
 	USED(args);
 	argcount(nargs, 0);
-	ios_printf(ios_stderr, "heap total     %10"PRIuPTR"\n", FL(heapsize));
-	ios_printf(ios_stderr, "heap free      %10"PRIuPTR"\n", (uintptr_t)(FL(lim)-FL(curheap)));
-	ios_printf(ios_stderr, "heap used      %10"PRIuPTR"\n", (uintptr_t)(FL(curheap)-FL(fromspace)));
-	ios_printf(ios_stderr, "stack          %10"PRIu64"\n", (uint64_t)FL(nstack)*sizeof(value_t));
+	ios_printf(ios_stderr, "heap total     %10"PRIuPTR" bytes\n", FL(heapsize));
+	ios_printf(ios_stderr, "heap free      %10"PRIuPTR" bytes\n", (uintptr_t)(FL(lim)-FL(curheap)));
+	ios_printf(ios_stderr, "heap used      %10"PRIuPTR" bytes\n", (uintptr_t)(FL(curheap)-FL(fromspace)));
+	ios_printf(ios_stderr, "stack          %10"PRIu64" bytes\n", (uint64_t)FL(nstack)*sizeof(value_t));
 	ios_printf(ios_stderr, "finalizers     %10"PRIu32"\n", (uint32_t)FL(nfinalizers));
 	ios_printf(ios_stderr, "max finalizers %10"PRIu32"\n", (uint32_t)FL(maxfinalizers));
 	ios_printf(ios_stderr, "gc handles     %10"PRIu32"\n", (uint32_t)FL(ngchandles));