summaryrefslogtreecommitdiff
path: root/src/kernel/mem/alloc.c
diff options
context:
space:
mode:
authordzwdz2022-05-05 22:47:12 +0200
committerdzwdz2022-05-05 22:47:12 +0200
commita40063321e8fbf4d82f46471221062bfa393604a (patch)
treedf4bb43830c0f94f90738d841b5caeb72922cda6 /src/kernel/mem/alloc.c
parent9900cc737988f25db30b5876f066a78e73389205 (diff)
kernel: each driver registers its own mounts
Diffstat (limited to 'src/kernel/mem/alloc.c')
-rw-r--r--src/kernel/mem/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/mem/alloc.c b/src/kernel/mem/alloc.c
index 3925689..797b018 100644
--- a/src/kernel/mem/alloc.c
+++ b/src/kernel/mem/alloc.c
@@ -102,9 +102,9 @@ void page_free(void *first_addr, size_t pages) {
}
}
-void kmalloc_sanity(void *addr) {
+void kmalloc_sanity(const void *addr) {
assert(addr);
- struct malloc_hdr *hdr = addr - sizeof(struct malloc_hdr);
+ const struct malloc_hdr *hdr = addr - sizeof(struct malloc_hdr);
assert(hdr->magic == MALLOC_MAGIC);
if (hdr->next) assert(hdr->next->prev == hdr);
if (hdr->prev) assert(hdr->prev->next == hdr);