--- uae/src/missing.c 2018/04/24 16:42:12 1.1.1.2 +++ uae/src/missing.c 2018/04/24 16:58:27 1.1.1.3 @@ -25,12 +25,22 @@ char *my_strdup (const char *s) #endif -void *xmalloc(size_t n) +void *xmalloc (size_t n) { void *a = malloc (n); if (a == NULL) { fprintf (stderr, "virtual memory exhausted\n"); abort (); + } + return a; +} + +void *xcalloc (size_t n, size_t size) +{ + void *a = calloc (n, size); + if (a == NULL) { + fprintf (stderr, "virtual memory exhausted\n"); + abort (); } return a; }