Created
October 25, 2011 06:44
-
-
Save passingloop/1311604 to your computer and use it in GitHub Desktop.
ただ malloc し続けるだけのプログラム
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> | |
#define GB 1073741824 | |
int main() | |
{ | |
char *p; | |
int i = 0; | |
do { | |
p = (char *)malloc(GB); | |
} while (p != NULL && ++i); | |
printf("%dGB\n", i); | |
exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment