mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-11-14 21:03:23 +00:00
13 lines
207 B
C
13 lines
207 B
C
|
//
|
||
|
// Created by Antoine Bartuccio on 22/05/2018.
|
||
|
//
|
||
|
|
||
|
#include "Objects.h"
|
||
|
|
||
|
void *malloc_or_die(size_t size){
|
||
|
void *ptr = malloc(size);
|
||
|
if (ptr == NULL)
|
||
|
perror("Error allocating object");
|
||
|
return ptr;
|
||
|
}
|