diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-09-26 15:09:13 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-09-26 17:40:03 -0400 |
commit | 30a1eeea37e224e4ade9b8e7cdd30076cb716960 (patch) | |
tree | a686de6c4aa4b1dbb9622b1af0ba5b699d79fe49 /includes/rts | |
parent | 018c40fb1bb27853d0cefa5b90a44ce13e91a856 (diff) | |
download | haskell-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/rts')
-rw-r--r-- | includes/rts/storage/GC.h | 5 |
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; |