Daniel said:
Why does this crash?
#include <string.h>
int main( int argc, char** argv ) {
char b[ 16000000 ];
memset( b, 0, 16000000 );
}
gcc crash.cc -o crash
"crash.cc" has the aroma of c++, anyway,
You have exceeded the limits provided by Standard C.
<quote>
5.2.4.1 Translation limits
1 The implementation shall be able to translate and execute at
least one program that contains at least one instance of every
one of the following limits:13)
-- 65535 bytes in an object (in a hosted environment only)
13) Implementations should avoid imposing fixed translation limits
whenever possible.
</quote>
An implementation is not compelled by the Standard to
successfully translate crash.cc.