how to increase memory limit in Visual Studio C++

后端 未结 1 1153
盖世英雄少女心
盖世英雄少女心 2021-01-22 04:39

Need Help.I\'m stuck at a problem when running a C++ code on Windows- Visual Studio.

When I run that code in Linux environment, there is no restriction on the memory I

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-22 05:10

    The problem is that you are allocating a huge multidimensional array on the stack in your main function (double a[..][..][..]). Do not allocate this much memory on the stack. Use malloc/new to allocate on the heap.

    0 讨论(0)
提交回复
热议问题