set MALLOC_CHECK_=2 in spectrum2 main process

This commit is contained in:
Jan Kaluza 2012-08-06 15:37:39 +02:00
parent d6ae5629a2
commit 2caa10e827
2 changed files with 6 additions and 0 deletions

View file

@ -125,6 +125,8 @@ int main(int argc, char **argv)
std::string jid;
setlocale(LC_ALL, "");
putenv("MALLOC_CHECK_=2");
putenv("MALLOC_PERTURB_=B");
#ifndef WIN32
if (signal(SIGINT, spectrum_sigint_handler) == SIG_ERR) {

View file

@ -10,6 +10,7 @@
#include <iterator>
#include <algorithm>
#include <boost/filesystem.hpp>
#include <cstdlib>
#include "signal.h"
#include "sys/wait.h"
@ -568,6 +569,9 @@ int main(int argc, char **argv)
return 1;
}
putenv("MALLOC_CHECK_=2");
putenv("MALLOC_PERTURB_=B");
if (command[0] == "start") {
start_instances(&config);
}