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

/**
 * File: mem.h
 */

#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