MyOS Libc
liballoc.h
1 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2 #ifndef _LIBALLOC_H
3 #define _LIBALLOC_H
4 
5 #include <stddef.h>
6 
7 
19 // If we are told to not define our own size_t, then we skip the define.
20 //#define _HAVE_UINTPTR_T
21 //typedef unsigned long uintptr_t;
22 
23 //This lets you prefix malloc and friends
24 #define PREFIX(func) func
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 
31 
39 extern int liballoc_lock();
40 
47 extern int liballoc_unlock();
48 
56 extern void* liballoc_alloc(size_t);
57 
66 extern int liballoc_free(void*,size_t);
67 
68 
69 
70 
71 extern void *PREFIX(malloc)(size_t);
72 extern void *PREFIX(realloc)(void *, size_t);
73 extern void *PREFIX(calloc)(size_t, size_t);
74 extern void PREFIX(free)(void *);
75 
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 
84 #endif
85 #endif
86 
87 
void * realloc(void *mem, size_t new_sz)
Definition: liballoc.c:741
void * malloc(size_t size)
Definition: liballoc.c:243
void free(void *mem)
Definition: liballoc.c:596