X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2Fhooks%2FOutOfHeap.c;h=98db0d7d49bfec4b98765ef42d6e498843a18143;hb=addb023e3d85afcf8b6d33d2d246c0934eaa994f;hp=39be01fb726550bcf03a0bdfb45f2530955bb4ce;hpb=438596897ebbe25a07e1c82085cfbc5bdb00f09e;p=ghc-hetmet.git diff --git a/ghc/rts/hooks/OutOfHeap.c b/ghc/rts/hooks/OutOfHeap.c index 39be01f..98db0d7 100644 --- a/ghc/rts/hooks/OutOfHeap.c +++ b/ghc/rts/hooks/OutOfHeap.c @@ -1,18 +1,19 @@ /* ----------------------------------------------------------------------------- - * $Id: OutOfHeap.c,v 1.2 1998/12/02 13:29:14 simonm Exp $ * * User-overridable RTS hooks. * * ---------------------------------------------------------------------------*/ #include "Rts.h" +#include void OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */ { /* fprintf(stderr, "Heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse `+RTS -H' to increase the total heap size.\n", */ - fprintf(stderr, "Heap exhausted;\nCurrent maximum heap size is %lu bytes;\nuse `+RTS -M' to increase it.\n", - heap_size); + (void)request_size; /* keep gcc -Wall happy */ + fprintf(stderr, "Heap exhausted;\nCurrent maximum heap size is %lu bytes (%lu Mb);\nuse `+RTS -M' to increase it.\n", + heap_size, heap_size / (1024*1024)); }