summaryrefslogtreecommitdiff
path: root/include/common/mem.h
blob: 7a06f39899566d6953b2730bb01ffe27c6ec39f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef UPEM_MORPHING_MEM
#define UPEM_MORPHING_MEM

/**
 * File: mem.h
 *
 * Author:
 *   Pacien TRAN-GIRARD
 */

#include <stddef.h>

/**
 * Function: malloc_or_die
 * Allocates a memory chunk of the requested size.
 * Interrupts the execution of the program in case of an error.
 *
 * Parameters:
 *   size - size of the chunk to allocate
 *
 * Returns:
 *   A non-NULL pointer to the allocated chunk
 */
void *malloc_or_die(size_t size);

#endif