Created
November 3, 2011 08:53
-
-
Save KristianLyng/1336075 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
| root@luke:~# cat foo.c | |
| #include <stdlib.h> | |
| int main(void) { | |
| int i; | |
| long int a; | |
| char *b; | |
| char buff[100010]; | |
| int buflen=0; | |
| srandom(time(NULL)); | |
| for (i=0;i < 10000000;i++) { | |
| a = random(); | |
| b = (char *) &a; | |
| buff[buflen++] = b[0]; | |
| buff[buflen++] = b[1]; | |
| buff[buflen++] = b[2]; | |
| buff[buflen++] = b[3]; | |
| if (buflen > 100000){ | |
| write(1,buff,buflen); | |
| buflen=0; | |
| } | |
| } | |
| write(1,buff,buflen); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment