diff options
Diffstat (limited to 'include/common/mem.h')
-rw-r--r-- | include/common/mem.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/common/mem.h b/include/common/mem.h new file mode 100644 index 0000000..1c46778 --- /dev/null +++ b/include/common/mem.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef UPEM_MORPHING_MEM | ||
2 | #define UPEM_MORPHING_MEM | ||
3 | |||
4 | /** | ||
5 | * File: mem.h | ||
6 | */ | ||
7 | |||
8 | #include <stddef.h> | ||
9 | |||
10 | /** | ||
11 | * Function: malloc_or_die | ||
12 | * Allocates a memory chunk of the requested size. | ||
13 | * Interrupts the execution of the program in case of an error. | ||
14 | * | ||
15 | * Parameters: | ||
16 | * size - size of the chunk to allocate | ||
17 | * | ||
18 | * Returns: | ||
19 | * A non-NULL pointer to the allocated chunk | ||
20 | */ | ||
21 | void *malloc_or_die(size_t size); | ||
22 | |||
23 | #endif | ||