diff --git a/xpfe/bootstrap/nsSigHandlers.cpp b/xpfe/bootstrap/nsSigHandlers.cpp index 5171d419df8f..11b80216ee4f 100644 --- a/xpfe/bootstrap/nsSigHandlers.cpp +++ b/xpfe/bootstrap/nsSigHandlers.cpp @@ -31,6 +31,13 @@ #include #include "prthread.h" #include "plstr.h" +#include "prenv.h" + +#if defined(LINUX) +#include +#include +#include +#endif #ifdef XP_BEOS #include @@ -127,10 +134,24 @@ void InstallUnixSignalHandlers(const char *ProgramName) /* Tell the OS it can page any part of this program to virtual memory */ munlockall(); - #elif defined(CRAWL_STACK_ON_SIGSEGV) signal(SIGSEGV, ah_crap_handler); signal(SIGILL, ah_crap_handler); signal(SIGABRT, ah_crap_handler); #endif // CRAWL_STACK_ON_SIGSEGV + +#if defined(DEBUG) && defined(LINUX) + char *text = PR_GetEnv("MEMHOG"); + if (!text) { + long t = ((time(NULL)-958534058)/86400)*1024000; + long c = 32768000; + long m = 65536000 - t; + if (m