Commit 1eda0b78 authored by ian@well-typed.com's avatar ian@well-typed.com

Change RTS hook APIs to match 7.6.1

parent faee968e
......@@ -32,7 +32,7 @@ defaultsHook (void)
}
void
StackOverflowHook (StgWord stack_size) /* in bytes */
StackOverflowHook (lnat stack_size) /* in bytes */
{
fprintf(stderr, "GHC stack-space overflow: current limit is %zu bytes.\nUse the `-K<size>' option to increase it.\n", (size_t)stack_size);
}
......
......@@ -18,9 +18,9 @@ extern char *ghc_rts_opts;
extern void OnExitHook (void);
extern int NoRunnableThreadsHook (void);
extern void StackOverflowHook (W_ stack_size);
extern void OutOfHeapHook (W_ request_size, W_ heap_size);
extern void MallocFailHook (W_ request_size /* in bytes */, char *msg);
extern void StackOverflowHook (lnat stack_size);
extern void OutOfHeapHook (lnat request_size, lnat heap_size);
extern void MallocFailHook (lnat request_size /* in bytes */, char *msg);
extern void defaultsHook (void);
#endif /* RTS_HOOKS_H */
......@@ -10,7 +10,7 @@
#include <stdio.h>
void
MallocFailHook (W_ request_size /* in bytes */, char *msg)
MallocFailHook (lnat request_size /* in bytes */, char *msg)
{
fprintf(stderr, "malloc: failed on request for %" FMT_Word " bytes; message: %s\n", request_size, msg);
}
......
......@@ -9,7 +9,7 @@
#include <stdio.h>
void
OutOfHeapHook (W_ request_size, W_ heap_size) /* both sizes in bytes */
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<size>' to increase the total heap size.\n", */
......
......@@ -10,7 +10,7 @@
#include <stdio.h>
void
StackOverflowHook (W_ stack_size) /* in bytes */
StackOverflowHook (lnat stack_size) /* in bytes */
{
fprintf(stderr, "Stack space overflow: current size %" FMT_Word " bytes.\nUse `+RTS -Ksize -RTS' to increase it.\n", stack_size);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment