Today Linux applications written under a "segmentation fault (core dumped)" problem, looked at the statistics, coupled with his own practice, summed up the reason for the following aspects.
1. Memory Access Error
A typical representative of such problems is the array bounds.
2. Illegal memory access
Such problems are mainly program attempts to access the kernel memory segment generated an error.
3. Stack Overflow
Linux default to a process to allocate stack space is 8M. When c ++ application variables, new variables in the application heap operations, other variables usually stored on the stack.
So if you are too big to open the array will face this problem.
First we look at the system resources assigned by default:
You can see the default stack size allocated to 8M.
If you really need more stack space, you can use the command ulimit -s XXXX to apply more stack space.