[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / runtime / hooks / OutOfHeap.lc
1 \begin{code}
2 #include "rtsdefs.h"
3
4 void
5 OutOfHeapHook (request_size)
6   W_ request_size; /* in bytes */
7 {
8     W_ heap_size = RTSflags.GcFlags.heapSize * sizeof(W_); /* i.e., in bytes */
9
10     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",
11         request_size,
12         heap_size);
13 }
14 \end{code}