How is it determined ? Does this depend on the compiler/Architecture/Host system ?
Example:
int array[0x8000000000000000];
For this line GCC outputs the following on a x86_64 bit system:
Error "size of array 'array' is too large".
How is it determined ? Does this depend on the compiler/Architecture/Host system ?
Example:
int array[0x8000000000000000];
For this line GCC outputs the following on a x86_64 bit system:
Error "size of array 'array' is too large".
By static array, I assume, you mean a fixed length array (statically allocated, like int array[SIZE], not dynamically allocated). Array size limit should depend on the scope of the array declared.
ulimit -a to view and ulimit -s STACK_SIZE to modify the stack size.static int array[SIZE]), again, the array is stored in DATA or BSS section (based on whether the array is initialized or uninitialized respectively). The DATA and BSS section size are determined by underlying OS.