GitOS
Operating system exercise
|
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Functions | |
int | kheap_init (void *start_address, uint32_t size) |
Initializes kernel heap. | |
void * | kmalloc (size_t size) |
Allocates specified size in heap. | |
void * | kzalloc (size_t size) |
Allocated specified size in heap and zeroes it. | |
void | kfree (void *ptr) |
Frees specified pointer. | |
void kfree | ( | void * | ptr | ) |
int kheap_init | ( | void * | start_address, |
uint32_t | size | ||
) |
Initializes kernel heap.
start_address | Starting address for heap allocation |
size | Size of heap in bytes |
References heap_table::entries, HEAP_BLOCK_SIZE, heap_create(), HEAP_TABLE_ADDRESS, kernel_heap, kernel_heap_table, size, start_address, and heap_table::total.
void * kmalloc | ( | size_t | size | ) |
Allocates specified size in heap.
size | Requested allocation size |
References heap_malloc(), kernel_heap, and size.