home · contact · privacy
License everything (GPL).
[plomrogue] / src / common / try_malloc.h
1 /* src/common/try_malloc.h
2  *
3  * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4  * or any later version. For details on its copyright, license, and warranties,
5  * see the file NOTICE in the root directory of the PlomRogue source package.
6  *
7  * malloc() wrapper.
8  */
9
10 #ifndef TRY_MALLOC_H
11 #define TRY_MALLOC_H
12
13 #include <sys/types.h> /* for size_t */
14
15
16
17 /* Call malloc("size") from function called "f"; exit_trouble() on error. */
18 extern void * try_malloc(size_t size, const char * f);
19
20
21
22 #endif