aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/memory/alloc.c
diff options
context:
space:
mode:
authorMarvin Borner2020-04-29 19:21:29 +0200
committerMarvin Borner2020-04-29 19:21:29 +0200
commit4546c75d685475d8b9f215b588364e1d1bbd0b79 (patch)
tree2077f72ad46dfe877f7febdd0692edc139fd7937 /src/kernel/memory/alloc.c
parent396d7d303d3bf0e796d0c817883ec1dec928352a (diff)
MUCH work in libc
Also cleaned up some syscalls etc
Diffstat (limited to 'src/kernel/memory/alloc.c')
-rw-r--r--src/kernel/memory/alloc.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/kernel/memory/alloc.c b/src/kernel/memory/alloc.c
index fd00cc7..f03c0f5 100644
--- a/src/kernel/memory/alloc.c
+++ b/src/kernel/memory/alloc.c
@@ -100,7 +100,7 @@ void free_internal(struct heap_header *heap, void *address)
}
if ((head->magic != KHEAP_MAGIC) || (head->magic2 != KHEAP_MAGIC2)) {
- //warn("Invalid header in heap");
+ warn("Invalid header in heap");
return;
}
@@ -110,7 +110,7 @@ void free_internal(struct heap_header *heap, void *address)
foot = (struct heap_footer *)((uint32_t)head - sizeof(struct heap_footer));
if ((foot->magic != KHEAP_MAGIC) || (foot->magic2 != KHEAP_MAGIC2)) {
- //warn("Invalid footer in heap");
+ warn("Invalid footer in heap");
return;
}
@@ -126,14 +126,7 @@ void free_internal(struct heap_header *heap, void *address)
foot = (struct heap_footer *)((uint32_t)heap + (heap->size + head->size + HEAP_TOTAL) +
HEAP_S);
if ((foot->magic != KHEAP_MAGIC) || (foot->magic2 != KHEAP_MAGIC2)) {
- /*vga_puts("Footer with size of ");
- vga_puts_hex(foot->size);
- vga_puts(" / head size of ");
- vga_puts_hex(heap->size);
- vga_puts("\n");
- dump_struct(foot, sizeof(struct heap_footer));
- warn("fatal arithmetic error in free() call");
- */
+ panic("Fatal arithmetic error in free() call");
return;
}