RTRlib
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
alloc_utils.h
1 /*
2  * This file is part of RTRlib.
3  *
4  * This file is subject to the terms and conditions of the MIT license.
5  * See the file LICENSE in the top level directory for more details.
6  *
7  * Website: http://rtrlib.realmv6.org/
8  */
9 
10 #ifndef LRTR_ALLOC_UTILS_H
11 #define LRTR_ALLOC_UTILS_H
12 
13 #include <stdlib.h>
14 
15 extern void *(*MALLOC_PTR)(size_t size);
16 extern void (*FREE_PTR)(void *ptr);
17 extern void *(*REALLOC_PTR)(void *ptr, size_t size);
18 
26 void lrtr_set_alloc_functions(
27  void *(*malloc_function)(size_t size),
28  void *(*realloc_function)(void *ptr, size_t size),
29  void (free_function)(void *ptr));
30 
31 void *lrtr_malloc(size_t size);
32 
33 void lrtr_free(void *ptr);
34 
35 void *lrtr_realloc(void *ptr, size_t size);
36 
37 #endif