Skip to content
Snippets Groups Projects
Commit 1eda0b78 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Change RTS hook APIs to match 7.6.1

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