Reorganisation of the source tree
[ghc-hetmet.git] / rts / hooks / OutOfHeap.c
1 /* -----------------------------------------------------------------------------
2  *
3  * User-overridable RTS hooks.
4  *
5  * ---------------------------------------------------------------------------*/
6
7 #include "Rts.h"
8 #include <stdio.h>
9
10 void
11 OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */
12 {
13   /*    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", */
14
15   (void)request_size;   /* keep gcc -Wall happy */
16   fprintf(stderr, "Heap exhausted;\nCurrent maximum heap size is %lu bytes (%lu Mb);\nuse `+RTS -M<size>' to increase it.\n",
17           heap_size, heap_size / (1024*1024));
18 }
19