ec02a7f2b73a24fe3b69492955dc74fc62e2d160
[ghc-hetmet.git] / ghc / rts / hooks / OutOfHeap.c
1 /* -----------------------------------------------------------------------------
2  * $Id: OutOfHeap.c,v 1.4 2002/07/17 09:21:51 simonmar Exp $
3  *
4  * User-overridable RTS hooks.
5  *
6  * ---------------------------------------------------------------------------*/
7
8 #include "Rts.h"
9 #include <stdio.h>
10
11 void
12 OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */
13 {
14   /*    fprintf(stderr, "Heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse `+RTS -H<size>' to increase the total heap size.\n", */
15
16   (void)request_size;   /* keep gcc -Wall happy */
17   fprintf(stderr, "Heap exhausted;\nCurrent maximum heap size is %lu bytes;\nuse `+RTS -M<size>' to increase it.\n",
18           heap_size);
19 }
20