mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-11-22 00:33:22 +00:00
19 lines
326 B
C
19 lines
326 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){
|
|
CRASH("Error allocating object");
|
|
}
|
|
return ptr;
|
|
}
|
|
|
|
void agent_exit(int error_code){
|
|
printf("Agent receiving code %d, exiting\n", error_code);
|
|
pthread_exit(NULL);
|
|
}
|