Large 2D array gives segmentation fault

后端 未结 7 1675
一生所求
一生所求 2020-12-02 08:08

I am writing some C++ code in Linux where I have declared a few 2D arrays like so:

 double x[5000][500], y[5000][500], z[5000][500];

During

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 08:47

    Another solution to the previous ones would be to execute a

    ulimit -s stack_area
    

    to expand the maximum stack.

提交回复
热议问题