Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- int main() {
- int i = 0;
- while (1) {
- void *x = malloc(1024);
- if (!x) {
- fprintf(stderr, "malloc returned NULL after allocated %dK\n", i);
- return 0;
- }
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement