aboutsummaryrefslogtreecommitdiff
path: root/interpreter/mem.c
blob: 7affd714d377985232d416ec55ec6624526aac8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "mem.h"

#include <stdio.h>

void* my_calloc(size_t num, size_t size) {
	void* ptr = calloc(num, size);
	if (!ptr) {
		perror(NULL);
		exit(EXIT_FAILURE);
	}
	return ptr;
}

void my_free(void* ptr) {
	free(ptr);
}