Fwd: how to increase the stack size

when I am running the program in my terminal on ubuntu its showing me GHC stack-space overflow: current limit is 536870912 bytes. Use the `-K<size>' option to increase it. how can i increase the stack size????Plz help me out....

On 17 October 2011 13:39, kolli kolli
when I am running the program in my terminal on ubuntu its showing me GHC stack-space overflow: current limit is 536870912 bytes. Use the `-K<size>' option to increase it. how can i increase the stack size????Plz help me out....
./myProgram +RTS -K<size> -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Monday 17 October 2011, 04:39:49, kolli kolli wrote:
when I am running the program in my terminal on ubuntu its showing me GHC stack-space overflow: current limit is 536870912 bytes. Use the `-K<size>' option to increase it. how can i increase the stack size????Plz help me out....
$ ./yourProg +RTS -K32M -RTS args to set the stack size to 32M; args are the command line arguments you want to pass to yourProg, if there are none, the -RTS isn't necessary.

From: kolli kolli
Subject: [Haskell-cafe] Fwd: how to increase the stack size
when I am running the program in my terminal on ubuntu its showing me GHC stack-space overflow: current limit is 536870912 bytes. Use the `-K<size>' option to increase it. how can i increase the stack size????Plz help me out....
Others have explained how to "Use the `-K<size>' option", but 536870912 is already 512MiB of stack. If that is not enough there is probably something wrong in the program, maybe an infinite loop.

when I am running the program in my terminal on ubuntu its showing me GHC stack-space overflow: current limit is 536870912 bytes. Use the `-K<size>' option to increase it. how can i increase the stack size????Plz help me out....
Others have explained how to "Use the `-K<size>' option",
However, those explanations did not take account of the fact that ghc now ignores +RTS options by default at runtime. You need to compile the program with an extra option -rtsopts, if you want the +RTS options to work at runtime. Regards, Malcolm
participants (5)
-
Brandon Moore
-
Daniel Fischer
-
Ivan Lazar Miljenovic
-
kolli kolli
-
Malcolm Wallace