justin finnerty wrote: My first guess is that you are running out of stack space when running on SuSE 10.2. In main you are allocating a local array, which will be done on the stack. For large data arrays you should use dynamically allocated memory that will come from the heap, and not the stack. Hope this helps, Burt
Anyone have any ideas?
--- test.c --- #include
#ifndef BUFFER_SIZE #define BUFFER_SIZE 16*1024 #endif
void test_fill (int* a_buffer , int a_size) { int l_index = 0; for (l_index = 0; l_index < a_size; ++l_index) { *(a_buffer + l_index) = l_index % 1024; } }
int main (int argc , char** argv) { int l_buffer[BUFFER_SIZE]; printf ("%s\n", "Hello World:"); /* Use array */ test_fill (&l_buffer[0], BUFFER_SIZE); printf ("%s\n", "Hello World again!"); return 0; } ___
___________________________________________________________ The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org