Skip to content

Instantly share code, notes, and snippets.

@osa1
Last active December 10, 2015 14:58
Show Gist options
  • Save osa1/4451206 to your computer and use it in GitHub Desktop.
Save osa1/4451206 to your computer and use it in GitHub Desktop.
ghci memory overflow
import qualified Data.Vector.Unboxed as V
-- ...
ghci> V.replicate (2^32 :: Int) 0
fromList <interactive>: out of memory (requested 34360786944 bytes)
ghci> V.replicate (2^32 :: Int) (2 :: Word32)
fromList <interactive>: out of memory (requested 17180917760 bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment