@@ -0,0 +1,13 @@
#include "util.h"
#include <stdio.h>
void *malloc_safe(size_t size) {
void *ptr = malloc(size);
if (!ptr && size) {
static char message[] = "out of memory!\n";
fwrite(message, 1, sizeof(message) - 1, stdout);
abort();
}
return ptr;
The note is not visible to the blocked user.