LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Andrej Bagon (andrej.bagon_at_[hidden])
Date: 2003-04-16 01:06:23


>This is most likely a stack size problem. You are trying to allocate
>about 8MB of data on the stack in the first example, which may be
>enough
>to overflow the stack (and therefore cause a segfault). With the
>second
>example, you move the array down into the heap, so you are much less
>likely to overflow.
>
>There isn't any "solution" to this issue, other than to allocate your
>large arrays on the heap. :)

so even the "ulimit -s unlimited" doesnt help (setting the stack to
unlimited)? because I did this and the program still crashes.

anyway I am going to use malloc from now and there will be no problems.
Thank you for the quick reply

-- 
Andrej Bagon <andrej.bagon_at_[hidden]>