Fixed bugs about kheap, paging and ordered list

Furthermore, added Heap kernel driver code
for both allocation and deallocation
free() does not works yet:
`ASSERTION-FAILED(head->magic == HEAP_MAGIC) at kheap.c:261`
This commit is contained in:
ice-bit
2019-09-24 18:32:38 +02:00
parent a378ca4061
commit 3c574238cf
6 changed files with 117 additions and 80 deletions

View File

@@ -251,7 +251,7 @@ void *alloc(uint32_t size, uint8_t page_align, heap_t *heap) {
void free(void *p, heap_t *heap) {
// Exit for null pointer
if(p == NULL)
if(p == 0)
return;
// Retrieve the header and the footer for this pointer