From 4ff4460d67e5b14ba7c8720328dc7a5bbb491f88 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 6 May 2023 02:05:20 +0300 Subject: [PATCH] put logging behind the macro check --- src/opt/mm_buddyTemplate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/opt/mm_buddyTemplate.c b/src/opt/mm_buddyTemplate.c index 93d5d418..307df6de 100644 --- a/src/opt/mm_buddyTemplate.c +++ b/src/opt/mm_buddyTemplate.c @@ -71,10 +71,14 @@ static NOINLINE void* BN(allocateMore)(i64 bucket, u8 type, i64 from, i64 to) { #endif #if NO_MMAP EmptyValue* c = calloc(sz+getPageSize(), 1); - fprintf(stderr, "\n"); + #if LOG_GC || LOG_MM_MORE + fprintf(stderr, "\n"); + #endif #else u8* mem = MMAP(sz); - fprintf(stderr, ": got %p\n", mem); + #if LOG_GC || LOG_MM_MORE + fprintf(stderr, ": got %p\n", mem); + #endif if (mem==MAP_FAILED) thrOOM(); if (ptr2u64(mem)+sz > (1ULL<<48)) err("mmap returned address range above 2⋆48"); #if ALLOC_MODE==0