From cbe97a1d0629707d48c17fa0c8fbe705495baab4 Mon Sep 17 00:00:00 2001 From: "pavlov%netscape.com" Date: Wed, 17 May 2000 04:06:08 +0000 Subject: [PATCH] minor fixups to the way we handle signals r=brendan --- xpfe/bootstrap/nsSigHandlers.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/xpfe/bootstrap/nsSigHandlers.cpp b/xpfe/bootstrap/nsSigHandlers.cpp index 5171d419df8..11b80216ee4 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