summaryrefslogtreecommitdiff
path: root/includes/RtsAPI.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-12-09 10:59:19 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-12-09 10:59:19 +0000
commit5a5acb3698aa4ffdd738c301fa722afe12a1f3de (patch)
treece83c8c73753a70b85b2409745b7498e00555559 /includes/RtsAPI.h
parent31d797eb1b3c5aa07f928b58402529fd35b71bcc (diff)
downloadhaskell-5a5acb3698aa4ffdd738c301fa722afe12a1f3de.tar.gz
Fix #2592: do an orderly shutdown when the heap is exhausted
Really we should be raising an exception in this case, but that's tricky (see comments). At least now we shut down the runtime correctly rather than just exiting.
Diffstat (limited to 'includes/RtsAPI.h')
-rw-r--r--includes/RtsAPI.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h
index 99aaa59ffb..41f0fc026c 100644
--- a/includes/RtsAPI.h
+++ b/includes/RtsAPI.h
@@ -22,7 +22,8 @@ typedef enum {
NoStatus, /* not finished yet */
Success, /* completed successfully */
Killed, /* uncaught exception */
- Interrupted /* stopped in response to a call to interruptStgRts */
+ Interrupted, /* stopped in response to a call to interruptStgRts */
+ HeapExhausted /* out of memory */
} SchedulerStatus;
typedef StgClosure *HaskellObj;