X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsUtils.c;h=7d6c4a557cb2c567b55fd1611541c1bb33cfbceb;hb=0e4eef1e5c326750d1b94c9b365c0b3fab19e611;hp=0123531e27ab3a8bdeed2607e852e065ae29898f;hpb=224a7fa07de24c67f52bc613f31ae1bf453cd7b8;p=ghc-hetmet.git diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index 0123531..7d6c4a5 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -13,6 +13,7 @@ #include "RtsFlags.h" #include "RtsUtils.h" #include "Ticky.h" +#include "Schedule.h" #ifdef HAVE_TIME_H #include @@ -272,15 +273,14 @@ stackOverflow(void) void heapOverflow(void) { - /* don't fflush(stdout); WORKAROUND bug in Linux glibc */ - OutOfHeapHook(0/*unknown request size*/, - RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE); - -#if defined(TICKY_TICKY) - if (RtsFlags.TickyFlags.showTickyStats) PrintTickyInfo(); -#endif + if (!heap_overflow) + { + /* don't fflush(stdout); WORKAROUND bug in Linux glibc */ + OutOfHeapHook(0/*unknown request size*/, + RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE); - stg_exit(EXIT_HEAPOVERFLOW); + heap_overflow = rtsTrue; + } } /* -----------------------------------------------------------------------------