|
ApertureOS
|

Data Structures | |
| struct | kmalloc_info |
Macros | |
| #define | IS_FREE(x) ((x->pointer & 1) == 0) |
| #define | IS_USED(x) ((x->pointer & 1) == 1) |
| #define | MARK_FREE(x) (x->pointer = CLEAR_BIT(x->pointer, 0)) |
| #define | MARK_USED(x) (x->pointer = SET_BIT(x->pointer, 0)) |
| #define | GET_ADDR(x) (x->pointer & ~1) |
| #define | SET_ADDR(x, val) (x->pointer = val | (x->pointer & 1)) |
| #define | STORE_SIZE MB(128) |
Functions | |
| void | kmalloc_init () |
| Initialize the kernel memory allocator. More... | |
| void | kcompact () |
| Compact the kernel memory allocation table. More... | |
| void * | kmalloc (size_t size) |
| kernel malloc More... | |
| void | kfree (void *addr) |
| kernel free More... | |
Variables | |
| void * | k_pages_base_addr |
| int | max_allocs = 0 |
| uint32_t | free_space = 0 |
| kmalloc_info * | allocation_info = NULL |
| kmalloc_info * | next_free_block = NULL |
| bool | retry = FALSE |
| #define GET_ADDR | ( | x | ) | (x->pointer & ~1) |
| #define IS_FREE | ( | x | ) | ((x->pointer & 1) == 0) |
| #define IS_USED | ( | x | ) | ((x->pointer & 1) == 1) |
| #define MARK_FREE | ( | x | ) | (x->pointer = CLEAR_BIT(x->pointer, 0)) |
| #define MARK_USED | ( | x | ) | (x->pointer = SET_BIT(x->pointer, 0)) |
| #define SET_ADDR | ( | x, | |
| val | |||
| ) | (x->pointer = val | (x->pointer & 1)) |
| #define STORE_SIZE MB(128) |
| kmalloc_info* allocation_info = NULL |
| uint32_t free_space = 0 |
| void* k_pages_base_addr |
| int max_allocs = 0 |
| kmalloc_info * next_free_block = NULL |
1.8.9.1