Skip to content

Instantly share code, notes, and snippets.

@ryuichiueda
Created February 15, 2026 02:26
Show Gist options
  • Select an option

  • Save ryuichiueda/5d27a6336caeb1c371a3a5f877c19708 to your computer and use it in GitHub Desktop.

Select an option

Save ryuichiueda/5d27a6336caeb1c371a3a5f877c19708 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char const *argv[]) {
int n = atoi(argv[1]);
for(int i=0;i<n;i++) {
char *p = malloc(1024*1024); //1MiBメモリ確保
for(int i=0;i<1024*1024;i+=4096)
p[i] = 111;
}
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment