internal error: allocation of ... bytes too large
Running the following program after normal compilation:
import GHC.DataSize
import qualified Data.HashTable.IO as HT
import Control.Monad
main = do
t <- HT.new :: IO (HT.BasicHashTable Int Char)
forM_ [0..100000] $ \i -> HT.insert t i 'a'
recursiveSize t
return ()
results in the following error:
internal error: allocation of 1208480 bytes too large (GHC should have complained at compile-time)
(GHC version 7.8.3 for x86_64_unknown_linux)
To reproduce, first: cabal install ghc-datasize hashtables
.
Edited by Thomas Miedema