summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-09-26 15:09:13 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-26 17:40:03 -0400
commit30a1eeea37e224e4ade9b8e7cdd30076cb716960 (patch)
treea686de6c4aa4b1dbb9622b1af0ba5b699d79fe49 /includes
parent018c40fb1bb27853d0cefa5b90a44ce13e91a856 (diff)
downloadhaskell-30a1eeea37e224e4ade9b8e7cdd30076cb716960.tar.gz
rts: Throw proper HeapOverflow exception on allocating large array
Test Plan: Validate, add tests Reviewers: simonmar, austin, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4021
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/GC.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index 387bd260d3..2aed7c57ee 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -184,8 +184,9 @@ extern generation * oldest_gen;
-------------------------------------------------------------------------- */
-StgPtr allocate ( Capability *cap, W_ n );
-StgPtr allocatePinned ( Capability *cap, W_ n );
+StgPtr allocate ( Capability *cap, W_ n );
+StgPtr allocateMightFail ( Capability *cap, W_ n );
+StgPtr allocatePinned ( Capability *cap, W_ n );
/* memory allocator for executable memory */
typedef void* AdjustorWritable;