From 6f815809538b0fa3bd0aacf9d010393a82dbb9b7 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 14 Mar 2024 15:40:09 -0700 Subject: [PATCH] Guard SHOW_MEMORY-only code --- SkipList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SkipList.cpp b/SkipList.cpp index 3d4e8ea..d3b7db4 100644 --- a/SkipList.cpp +++ b/SkipList.cpp @@ -699,9 +699,11 @@ __attribute__((__visibility__("default"))) void ConflictSet_destroy(void *cs) { } } +#if SHOW_MEMORY struct __attribute__((visibility("default"))) PeakPrinter { ~PeakPrinter() { printf("malloc bytes: %g\n", double(mallocBytes)); printf("Peak malloc bytes: %g\n", double(peakMallocBytes)); } -} peakPrinter; \ No newline at end of file +} peakPrinter; +#endif \ No newline at end of file