From 62ec122116129b4aac84abf3f18b1a504b1919f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 31 Jan 2018 18:28:49 +0100 Subject: [PATCH] Remove memory statistics for interrupt safety MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reading the memory statistics requires a call to fopen, which uses the async-signal-unsafe function malloc. For this reason, interrupting Madagascar could lead to a crash when coinciding with allocations. Removing the memory statistics doesn’t do much harm, as this can still be read from an outside program such as the benchmark runner. --- Makefile | 2 +- main.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2aa393c..646c1c5 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ EXECUTABLE=Mp #EXECUTABLE=M #ARCH=-m32 -INSTRUMENT = #-g -ggdb -pg +INSTRUMENT = -g -ggdb -pg CONFIGURATION= -DLBD -DREPRTHREE -DWEIGHTS #-DFUIP #-DMULTICORE #-DSPREAD -DCOSTS -DCFMA -DCP3 diff --git a/main.c b/main.c index a10cb41..5523d0b 100644 --- a/main.c +++ b/main.c @@ -215,8 +215,6 @@ void printStatistics() time2real(time10ms() - TIMEstart), time2real(TIMEpreprocess - TIMEstart)); - givememorystatistics(); - printf("maxLearnedClauseLength: %i\n",stats_longest_learned); if (numberOfGroundActionsAfterParsing > -1)