cs: fix peak-memory logging

That number shouldn't be negative, but print it right in case it is.
This commit is contained in:
Matthew Flatt 2020-04-22 14:38:06 -06:00
parent 7c7d514f73
commit 9358ebc97d

View File

@ -685,9 +685,9 @@
(let ([debug-GC? (log-level?* root-logger 'debug 'GC)]
[debug-GC:major? (log-level?* root-logger 'debug 'GC:major)])
(when (or debug-GC? debug-GC:major?)
(let ([msg (chez:format "GC: 0:atexit peak ~a(+~a); alloc ~a; major ~a; minor ~a; ~ams"
(let ([msg (chez:format "GC: 0:atexit peak ~a(~a); alloc ~a; major ~a; minor ~a; ~ams"
(K "" peak-mem)
(K "" (- (maximum-memory-bytes) peak-mem))
(K "+" (- (maximum-memory-bytes) peak-mem))
(K "" (- (+ (bytes-deallocated) (bytes-allocated)) (initial-bytes-allocated)))
major-gcs
minor-gcs