I can find plenty of examples of developers complaining that a big array initialized on the stack create a stack overflow error
int main(int argc, const char * argv[])
{
int v[100000000];
memset(&v, 0, sizeof(v));
}
When compiling on Apple LLVM 7.0, this does not cause a stack overflow, this puzzles me as the array has a size of ~400Mb, significantly more than what is usually the size of the stack.
Why does the above code not cause stack overflow?
as the array has a size of 100Mb. it is sizeof(int)*100M actually