Remove memory statistics for interrupt safety

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.
This commit is contained in:
Patrick Lühne 2018-01-31 18:28:49 +01:00
parent 6c25431873
commit 62ec122116
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 1 additions and 3 deletions

View File

@ -11,7 +11,7 @@ EXECUTABLE=Mp
#EXECUTABLE=M #EXECUTABLE=M
#ARCH=-m32 #ARCH=-m32
INSTRUMENT = #-g -ggdb -pg INSTRUMENT = -g -ggdb -pg
CONFIGURATION= -DLBD -DREPRTHREE -DWEIGHTS #-DFUIP #-DMULTICORE #-DSPREAD -DCOSTS -DCFMA -DCP3 CONFIGURATION= -DLBD -DREPRTHREE -DWEIGHTS #-DFUIP #-DMULTICORE #-DSPREAD -DCOSTS -DCFMA -DCP3

2
main.c
View File

@ -215,8 +215,6 @@ void printStatistics()
time2real(time10ms() - TIMEstart), time2real(time10ms() - TIMEstart),
time2real(TIMEpreprocess - TIMEstart)); time2real(TIMEpreprocess - TIMEstart));
givememorystatistics();
printf("maxLearnedClauseLength: %i\n",stats_longest_learned); printf("maxLearnedClauseLength: %i\n",stats_longest_learned);
if (numberOfGroundActionsAfterParsing > -1) if (numberOfGroundActionsAfterParsing > -1)