Fixed heap

This commit is contained in:
vanten-s 2024-08-10 18:08:17 +02:00
parent 0fd7b67bce
commit 4c7a1330d0
Signed by: vanten-s
GPG key ID: DE3060396884D3F2

View file

@ -3,7 +3,7 @@
#include <kernel/heap.h> #include <kernel/heap.h>
#include <debugging.h> #include <debugging.h>
#define HEAP_SIZE (256 * 4096) #define HEAP_SIZE (4096)
uint8_t* global_heap_data[HEAP_SIZE + sizeof(struct Heap_Block)]; uint8_t* global_heap_data[HEAP_SIZE + sizeof(struct Heap_Block)];
struct Heap_Metadata global_heap; struct Heap_Metadata global_heap;
@ -63,7 +63,7 @@ void free(void *ptr)
struct Heap_Block* start = current; struct Heap_Block* start = current;
while (current->used == false && current->next != 0) { while (current->used == false && current != 0) {
current = current->next; current = current->next;
} }