aboutsummaryrefslogtreecommitdiff
path: root/memory.c
blob: 952bedf290efd4caee41639d9cef535c87d6eed2 (plain)
1
2
3
4
5
6
7
8
9
#include "global.h"
#include "memory.h"

void* check_after_allocation(const char *func,size_t num,size_t sz,void *ptr){
	if(ptr==NULL){
		die("Allocation failed: %s(%zu * %zuB = %zu)",func,num,sz,num*sz);
	}
	return ptr;
}