Created
December 10, 2020 11:15
-
-
Save tomty89/b945364b3c25d0a0dcc7ea7e534c1acc to your computer and use it in GitHub Desktop.
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
int main() { | |
size_t sz; | |
void * buf; | |
sz = sysconf(_SC_PAGESIZE); | |
buf = malloc(sz); | |
memset(buf, 0xff, sz); | |
int ret; | |
do { | |
ret = write(1, buf, sz); | |
} while (ret > 0); | |
free(buf); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment