Add back inferior heap size reporting

I'm sure this was present before, but maybe lost during some refactoring.
This commit is contained in:
Christopher Baines 2024-01-15 11:49:48 +00:00
parent 60980e2668
commit 45d9b1ad7c

View file

@ -137,7 +137,7 @@
(assoc-ref stats 'heap-free-size)) (assoc-ref stats 'heap-free-size))
(expt 2. 20))) (expt 2. 20)))
(round (round
(/ (assoc-ref (gc-stats) 'heap-size) (/ (assoc-ref stats 'heap-size)
(expt 2. 20))))) (expt 2. 20)))))
(list (system-test-name system-test) (list (system-test-name system-test)
@ -492,6 +492,18 @@
args) args)
#f))) #f)))
(let ((stats (gc-stats)))
(simple-format
(current-error-port)
"inferior heap: ~a MiB used (~a MiB heap)~%"
(round
(/ (- (assoc-ref stats 'heap-size)
(assoc-ref stats 'heap-free-size))
(expt 2. 20)))
(round
(/ (assoc-ref stats 'heap-size)
(expt 2. 20)))))
(vector-map (vector-map
(lambda (_ package) (lambda (_ package)
(catch (catch