bdk: heap: improvements

Correct types everywhere.
Add BDK_MALLOC_NO_DEFRAG that disables defragmentation on the heap.
This commit is contained in:
CTCaer
2022-02-15 00:22:38 +02:00
parent ad4014f295
commit 83b895a062
2 changed files with 42 additions and 27 deletions

View File

@@ -31,8 +31,9 @@ typedef struct _hnode
typedef struct _heap
{
u32 start;
void *start;
hnode_t *first;
hnode_t *last;
} heap_t;
typedef struct
@@ -41,8 +42,8 @@ typedef struct
u32 used;
} heap_monitor_t;
void heap_init(u32 base);
void heap_copy(heap_t *heap);
void heap_init(void *base);
void heap_set(heap_t *heap);
void *malloc(u32 size);
void *calloc(u32 num, u32 size);
void free(void *buf);