diff options
author | Demi Obenour <demiobenour@gmail.com> | 2017-01-10 13:33:31 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-10 13:33:38 -0500 |
commit | 12ad4d417b89462ba8e19a3c7772a931b3a93f0e (patch) | |
tree | 97b5c7e3ba6329ecf99e7431c10d43ee66758d1b /includes | |
parent | e8d74321b5b24afcb4230510fd6e4c4ecf6f3e19 (diff) | |
download | haskell-12ad4d417b89462ba8e19a3c7772a931b3a93f0e.tar.gz |
Throw an exception on heap overflow
This changes heap overflow to throw a HeapOverflow exception instead of
killing the process.
Test Plan: GHC CI
Reviewers: simonmar, austin, hvr, erikd, bgamari
Reviewed By: simonmar, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2790
GHC Trac Issues: #1791
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/Flags.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index 62d0800e68..0412415aca 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -15,6 +15,10 @@ #define RTS_FLAGS_H #include <stdio.h> +#include <stdint.h> +#include <stdbool.h> +#include "stg/Types.h" +#include "Time.h" /* For defaults, see the @initRtsFlagsDefaults@ routine. */ @@ -71,6 +75,12 @@ typedef struct _GC_FLAGS { * to handle the exception before we * raise it again. */ + StgWord heapLimitGrace; /* units: *blocks* + * After a HeapOverflow exception has + * been raised, how much extra space is + * given to the thread to handle the + * exception before we raise it again. + */ bool numa; /* Use NUMA */ StgWord numaMask; |