#7500: GHC: internal error: getMBlock: mmap: Operation not permitted --------------------------+------------------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: Os: Linux | Architecture: Unknown/Multiple Failure: Runtime crash | Blockedby: Blocking: | Related: --------------------------+------------------------------------------------- Trying to calculate partition of a number using generating fuction with memoization, like this:
{{{ #!/usr/bin/runhaskell part'' :: Int -> Integer part'' = ( map part' [0..] !!) part' :: Int -> Integer part' 0 = 1 part' 1 = 1 part' n = sum $ map (\k -> let kk = fromInteger(k); k1 = floor(1/2*kk*(3*kk-1)); k2 = floor(1/2*kk*(3*kk+1)) in (-1)^(k+1) * ( (part (n-k1)) + (part (n-k2))) ) [1..toInteger(n)] part n = if n < 0 then 0 else part'' n main = print $ part 20000 }}} Then i watch how memory usage grows up to 2G (RES) and program stops: {{{ ./bug.hs bug.hs: internal error: getMBlock: mmap: Operation not permitted (GHC version 7.4.1 for i386_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportab }}} The kernel is compiled with PAE, and machine has 8G of RAM -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7500> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs