Fwd: how to increase the stack size

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: how to increase the stack size

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....


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: how to increase the stack size

Ivan Lazar Miljenovic
On 17 October 2011 13:39, kolli kolli <[hidden email]> 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....

./myProgram +RTS -K<size>

--
Ivan Lazar Miljenovic
[hidden email]
IvanMiljenovic.wordpress.com

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: how to increase the stack size

Daniel Fischer
In reply to this post by kolli kolli
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.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: how to increase the stack size

Brandon Moore-2
In reply to this post by kolli kolli
>From: kolli kolli <[hidden email]>

>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.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: how to increase the stack size

Malcolm Wallace-2
>> 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

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe