/* eatmemory.c created sometime early 2003 by billy@gonoph.net */ /* released in the public domain for anyone silly enough to run it */ /* use at your own risk! */ #include #include #ifdef POSIX #include #else #include #include #include #endif #include const int CHUNK=1024*1024; char **CreateLargeArray(unsigned long megs); char **CreateLargeChunk(unsigned long chunks,char **largearray); int main(int argc,char **argv) { char **bigarray=NULL; unsigned long megabytes; unsigned long old_megabytes=0; unsigned long looper1; unsigned long long realbytes; fd_set empty; struct timeval waittv; printf("Enter Megabytes to chew: "); fscanf(stdin,"%lu",&megabytes); printf("\n"); realbytes=megabytes*CHUNK; /* the memory eating portion was in a loop. * I've since removed the loop, but kept this * part in case anyone wants to put it back in */ if (bigarray) { for(looper1=0;looper14GB of memory. */ for(looper1=0;looper1