2 * Two Levels Segregate Fit memory allocator (TLSF)
5 * Written by Miguel Masmano Tello <mimastel@doctor.upv.es>
7 * Thanks to Ismael Ripoll for his suggestions and reviews
9 * Copyright (C) 2008, 2007, 2006, 2005, 2004
11 * This code is released using a dual license strategy: GPL/LGPL
12 * You can choose the licence that better fits your requirements.
14 * Released under the terms of the GNU General Public License Version 2.0
15 * Released under the terms of the GNU Lesser General Public License Version 2.1
22 #include <string.h> /* defines size_t */
24 extern size_t init_memory_pool(size_t, void *);
25 extern size_t get_used_size(void *);
26 extern size_t get_max_size(void *);
27 extern void destroy_memory_pool(void *);
28 extern size_t add_new_area(void *, size_t, void *);
29 extern void *malloc_ex(size_t, void *);
30 extern void free_ex(void *, void *);
31 extern void *realloc_ex(void *, size_t, void *);
32 extern void *calloc_ex(size_t, size_t, void *);
34 extern void *tlsf_malloc(size_t size
);
35 extern void tlsf_free(void *ptr
);
36 extern void *tlsf_realloc(void *ptr
, size_t size
);
37 extern void *tlsf_calloc(size_t nelem
, size_t elem_size
);