5#define HEAP_BLOCK_TABLE_ENTRY_TAKEN 0x01
6#define HEAP_BLOCK_TABLE_ENTRY_FREE 0x00
8#define HEAP_BLOCK_HAS_NEXT 0b10000000
9#define HEAP_BLOCK_IS_FIRST 0b01000000
25#define HEAP_TABLE_ADDRESS 0x00007e00
26#define HEAP_BLOCK_SIZE 4096
uint16_t size
Definition gdt.h:0
void heap_free(heap *heap, void *ptr)
Frees specified pointer in heap.
Definition heap.c:223
int heap_create(heap *heap, heap_table *table, void *ptr, void *end)
Creates heap in specified chunk of memory.
Definition heap.c:186
void * heap_malloc(heap *heap, size_t size)
unsigned char HEAP_BLOCK_TABLE_ENTRY
Definition heap.h:11
HEAP_BLOCK_TABLE_ENTRY * entries
Definition heap.h:15
size_t total
Definition heap.h:16
heap_table * table
Definition heap.h:21
void * start_address
Definition heap.h:22