Created
July 21, 2008 02:46
-
-
Save bkerley/48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#define BLOCKS 8192 | |
#define BLOCKSIZE 8192 | |
int main() { | |
int* blocks[BLOCKS]; | |
int i; | |
for (i=0;i<BLOCKS;i++) { | |
blocks[i] = (int*)calloc(BLOCKSIZE,sizeof(int)); | |
} | |
while (1) { | |
i = blocks[rand()%BLOCKS][rand()%BLOCKSIZE]; | |
} | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment