1 /* -----------------------------------------------------------------------------
3 * User-overridable RTS hooks.
5 * ---------------------------------------------------------------------------*/
7 #include "PosixSource.h"
12 OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */
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", */
16 (void)request_size; /* keep gcc -Wall happy */
17 fprintf(stderr, "Heap exhausted;\nCurrent maximum heap size is %lu bytes (%lu MB);\nuse `+RTS -M<size>' to increase it.\n",
18 heap_size, heap_size / (1024*1024));