[Haskell-cafe] ghc +RTS -M and -A behaving strange

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Wed Dec 29 15:41:22 CET 2010


> ghci> (8000*2^20) `mod` (2^32)
> 4093640704
> 
> Seems GHC uses Word for the allocation figures 

Interesting. Then how can I set the memory bounds that I want?
The machine has 12 GB, and if I leave out any RTS options,
then the ghc-compiled program will happily consume it all.

> and you have a 32-bit  system.

uname -a 
Linux --- 2.6.32-bpo.5-amd64 #1 SMP Sat Sep 18 19:03:14 UTC 2010 x86_64 GNU/Linux

cat /proc/cpuinfo 
processor	: 0 .. 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz

ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3





More information about the Haskell-Cafe mailing list