summaryrefslogtreecommitdiff
path: root/runtime/calloc.c
blob: 2526cebf5cec61c2c204c54fd5a77e97a6e22afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>

void * compcert_alloc(int sz)
{
  void * res = malloc(sz);
  if (res == NULL) {
    fprintf(stderr, "Out of memory in compcert_alloc().\n");
    abort();
  }
  return res;
}