apps: make memeater use perror
This commit is contained in:
parent
ee7558a9b7
commit
e76d903642
@ -15,6 +15,6 @@ int main()
|
|||||||
printf("Allocating 4 MB of memory... %lx\n", (unsigned long)allocated);
|
printf("Allocating 4 MB of memory... %lx\n", (unsigned long)allocated);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
} while ((allocated = malloc(CHUNK)));
|
} while ((allocated = malloc(CHUNK)));
|
||||||
printf("Out of memory. (errno=%d, %s)\n", errno, strerror(errno));
|
perror("malloc");
|
||||||
printf("Press any key to restart.\n");
|
printf("Press any key to restart.\n");
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user