Catch too-large allocations and emit an error message (#4505)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 9 Dec 2010 11:40:05 +0000 (11:40 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 9 Dec 2010 11:40:05 +0000 (11:40 +0000)
commita278f3f02d09bc32b0a75d4a04d710090cde250f
tree1f6fc7dd617de453f7b0ee9b8c3f69cb74caa24b
parent47808bdc0bae8e5ba2910c85ea6c0699af01e97c
Catch too-large allocations and emit an error message (#4505)

This is a temporary measure until we fix the bug properly (which is
somewhat tricky, and we think might be easier in the new code
generator).

For now we get:

ghc-stage2: sorry! (unimplemented feature or known bug)
  (GHC version 7.1 for i386-unknown-linux):
        Trying to allocate more than 1040384 bytes.

See: http://hackage.haskell.org/trac/ghc/ticket/4550
Suggestion: read data from a file instead of having large static data
structures in the code.
compiler/codeGen/CgHeapery.lhs
includes/HaskellConstants.hs
includes/mkDerivedConstants.c
rts/Schedule.c