4 * Internals for the memory allocator
9 #include <klibc/sysconfig.h>
12 * This structure should be a power of two. This becomes the
15 struct free_arena_header;
19 size_t size; /* Also gives the location of the next entry */
20 struct free_arena_header *next, *prev;
24 #define ARENA_TYPE_USED 0x64e69c70
25 #define ARENA_TYPE_FREE 0x012d610a
26 #define ARENA_TYPE_HEAD 0x971676b5
27 #define ARENA_TYPE_DEAD 0xeeeeeeee
29 #define ARENA_TYPE_USED 0
30 #define ARENA_TYPE_FREE 1
31 #define ARENA_TYPE_HEAD 2
34 #define ARENA_SIZE_MASK (~(sizeof(struct arena_header)-1))
37 * This structure should be no more than twice the size of the
40 struct free_arena_header {
41 struct arena_header a;
42 struct free_arena_header *next_free, *prev_free;
45 extern struct free_arena_header __malloc_head;