a.out too big
Hi!
This code Code:
int array[4000000]={0}; Code:
#include <stdlib.h> Anyone knows why this is so? I'm using Red Hat 9, gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5). Thanks in advance |
Your example illustrates the difference between statically and dynamically allocated memory.
In the first example, the int array is already in the binary while in the second one, the array is created at runtime. |
All times are GMT -5. The time now is 10:13 AM. |