Hi,
I have a program doing the following, and I have
a shell script to run it in a loop of about 300 iterations.
I will get about 1 or two of "Bus error core dump" err(s), which
occurs around the free() function calls.
Anybody please give me some hint of why?
Thanks a lot.
Frank
-----psudo code start:
char *array[51];
FILE *f_out;
...
f_out = fpen(filename, "a");
for(i = 0; i < 50 ; i++)
{
array[i] = (char *)malloc(1024);
if(!array[i])
...
array[50] = 0;Quote:}
connec_oracle();
select (list) into array from (table_joins);
process(array);
write(f_out, array);
for(i = 0; i < 50 ; i++)
{
free(array[i]);
close(f_out);Quote:}