From 9358ebc97d31953baa3be661a4abe5171fd28561 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 22 Apr 2020 14:38:06 -0600 Subject: [PATCH] cs: fix peak-memory logging That number shouldn't be negative, but print it right in case it is. --- racket/src/cs/main.sps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/racket/src/cs/main.sps b/racket/src/cs/main.sps index 0e6d680d2c..4602497d25 100644 --- a/racket/src/cs/main.sps +++ b/racket/src/cs/main.sps @@ -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