T
tomy
Hi all:
There is an amazing coredump in my C code, I was thinking it over and
over...
The code is simple as below:
//*************************************
const unsigned long int len = 102400000;
int array[len];
unsigned long int i;
for(i=0; i<len; i++)
{
array = 0; //The coredump line;
}
//*************************************
with gdb, when variable i came to 0, the "array=0", the process
received segmentation fault and left coredump. Is there any wrong in
THAT line? It seems all right, with the condition i=0.
--tomy
There is an amazing coredump in my C code, I was thinking it over and
over...
The code is simple as below:
//*************************************
const unsigned long int len = 102400000;
int array[len];
unsigned long int i;
for(i=0; i<len; i++)
{
array = 0; //The coredump line;
}
//*************************************
with gdb, when variable i came to 0, the "array=0", the process
received segmentation fault and left coredump. Is there any wrong in
THAT line? It seems all right, with the condition i=0.
--tomy