Created
October 10, 2017 21:57
-
-
Save eam/35a7ad1836bbd1cf7219183a7040b362 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 <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
char buf[4096]; | |
int main() { | |
int fd; | |
fd = open("/dev/null", O_WRONLY); | |
for (int i = 0; i < (1 << 25); i++) { | |
write(fd, buf, 4096); | |
} | |
close(fd); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment