ref: 1dd15a7d2be65f89e7d012c5c77f4c7d2d71227b
parent: 82905b0e1ae8656ce0ac47ac6b30d93237186c33
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Nov 26 00:36:31 EST 2024
*vm-stats*: print heap total and free
--- a/flisp.c
+++ b/flisp.c
@@ -2102,7 +2102,8 @@
USED(args);
argcount(nargs, 0);
ios_printf(ios_stderr, "nstack %"PRIu32"\n", FL(nstack));
- ios_printf(ios_stderr, "heapsize %"PRIu32"\n", FL(heapsize));
+ ios_printf(ios_stderr, "heap total %"PRIu32"\n", FL(heapsize));
+ ios_printf(ios_stderr, "heap free %"PRIu64"\n", (uint64_t)(FL(lim)-FL(curheap)));
ios_printf(ios_stderr, "maxfinalizers %"PRIu64"\n", (uint64_t)FL(maxfinalizers));
ios_printf(ios_stderr, "gc calls %"PRIu64"\n", (uint64_t)FL(gccalls));
return FL(t);