Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ff13879736fd30fcc2c97c28c6779cfab1990e28
[simgrid.git] / include / xbt / mallocator.h
1 #ifndef _XBT_MALLOCATOR_H
2 #define _XBT_MALLOCATOR_H
3
4 #include "xbt/function_types.h"
5 #include "xbt/misc.h" /* SG_BEGIN_DECL */
6
7 SG_BEGIN_DECL()
8
9 /* mallocator data type (opaque structure) */
10 typedef struct s_xbt_mallocator *xbt_mallocator_t;
11
12 /* creation and destruction */
13 xbt_mallocator_t xbt_mallocator_new(int size, pvoid_f_void_t new_f, void_f_pvoid_t free_f, void_f_pvoid_t reset_f);
14 void xbt_mallocator_free(xbt_mallocator_t mallocator);
15
16 /* object handling */
17 void *xbt_mallocator_get(xbt_mallocator_t mallocator);
18 void xbt_mallocator_release(xbt_mallocator_t mallocator, void *object);
19
20 SG_END_DECL()
21
22 #endif /* _XBT_MALLOCATOR_H */