Changeset - 8acda88ffe61
[Not reviewed]
0 3 0
Jan Kaluza - 13 years ago 2012-08-06 16:40:18
hanzz.k@gmail.com
Set MALLOC_CHECK_ using mallopt
3 files changed with 8 insertions and 5 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -1692,6 +1692,9 @@ int main(int argc, char **argv) {
 
	}
 
	else {
 
#ifndef WIN32
 
		mallopt(M_CHECK_ACTION, 2);
 
		mallopt(M_PERTURB, 0xb);
 

	
 
		signal(SIGPIPE, SIG_IGN);
 

	
 
		if (signal(SIGCHLD, spectrum_sigchld_handler) == SIG_ERR) {
spectrum/src/main.cpp
Show inline comments
 
@@ -26,6 +26,7 @@
 
#include <grp.h>
 
#include <sys/resource.h>
 
#include "libgen.h"
 
#include <malloc.h>
 
#else
 
#include <windows.h>
 
#endif
 
@@ -125,8 +126,10 @@ int main(int argc, char **argv)
 
	std::string jid;
 

	
 
	setlocale(LC_ALL, "");
 
	putenv("MALLOC_CHECK_=2");
 
	putenv("MALLOC_PERTURB_=B");
 
#ifndef WIN32
 
	mallopt(M_CHECK_ACTION, 2);
 
	mallopt(M_PERTURB, 0xb);
 
#endif
 

	
 
#ifndef WIN32
 
	if (signal(SIGINT, spectrum_sigint_handler) == SIG_ERR) {
spectrum_manager/src/main.cpp
Show inline comments
 
@@ -569,9 +569,6 @@ int main(int argc, char **argv)
 
		return 1;
 
	}
 
 
	putenv("MALLOC_CHECK_=2");
 
	putenv("MALLOC_PERTURB_=B");
 
 
	if (command[0] == "start") {
 
		start_instances(&config);
 
	}
0 comments (0 inline, 0 general)