#include /*** * A ridiculously tiny program dealing with memory allocation */ #define SIZ 160000000 /** * When you define an array globally, like on the next line, you can create an array with at * least 160 million items. (At least on powerpuff you can). * Globally array are allocated from the heap and space on the heap seems to only be limited by * system resources. *****/ int globalArray[SIZ]; int main() { /******* * Local variables are allocated on the stack, and the stack size is usually much less than gigabytes. * Hence, local variables * are far more constrained in size than global *******/ //int localArray[SIZ]; fprintf(stderr, "Hello %d\n", SIZ); for (int i=0; i