19 #include <sys/cdefs.h>
63 void *
malloc(
size_t size);
77 void *
calloc(
size_t nmemb,
size_t size);
89 void free(
void * ptr);
103 void *
realloc(
void * ptr,
size_t size);
114 void *
memalign(
size_t alignment,
size_t size);
125 void *
valloc(
size_t size);
133 #define DEFAULT_MXFAST 64
135 #define M_TRIM_THRESHOLD -1
136 #define DEFAULT_TRIM_THRESHOLD (256*1024)
139 #define DEFAULT_TOP_PAD 0
141 #define M_MMAP_THRESHOLD -3
142 #define DEFAULT_MMAP_THRESHOLD (256*1024)
144 #define M_MMAP_MAX -4
145 #define DEFAULT_MMAP_MAX 65536
int fsmblks
space available in freed fastbin blocks
Definition: malloc.h:42
void * malloc(size_t size)
allocate memory
void malloc_stats()
Debug function.
int uordblks
total allocated space
Definition: malloc.h:44
void free(void *ptr)
releases memory that was previous allocated
int malloc_irq_safe()
KOS specfic calls.
void * valloc(size_t size)
allocates memory aligned to the system page size
void * memalign(size_t alignment, size_t size)
allocate memory aligned memory
void * realloc(void *ptr, size_t size)
changes the size of previously allocated memory
int usmblks
maximum total allocated space
Definition: malloc.h:40
int mem_check_block(void *p)
Only available with KM_DBG.
int smblks
number of fastbin blocks
Definition: malloc.h:34
int hblkhd
space in mmapped regions
Definition: malloc.h:38
int keepcost
top-most, releasable (via malloc_trim) space
Definition: malloc.h:48
int mem_check_all()
Only available with KM_DBG.
int arena
non-mmapped space allocated from system
Definition: malloc.h:30
int fordblks
total free space
Definition: malloc.h:46
ANSI C functions.
Definition: malloc.h:28
int ordblks
number of free chunks
Definition: malloc.h:32
void * calloc(size_t nmemb, size_t size)
allocate memory on the heap and initialize it to 0
int hblks
number of mmapped regions
Definition: malloc.h:36