diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-06 19:31:05 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-06 19:31:05 +0100 |
commit | a48466109f59d507f9108635a5dc4ec865173f85 (patch) | |
tree | fea09e9e54d40352a25a885b361d694d40b7417b /kernel/l0 | |
parent | ff27e3d5ca61fb6234b0876dc3368d0e5dfc5a95 (diff) | |
download | kogata-a48466109f59d507f9108635a5dc4ec865173f85.tar.gz kogata-a48466109f59d507f9108635a5dc4ec865173f85.zip |
Clean slab_alloc. Bug still here.
Diffstat (limited to 'kernel/l0')
-rw-r--r-- | kernel/l0/kmain.c | 2 | ||||
-rw-r--r-- | kernel/l0/paging.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/kernel/l0/kmain.c b/kernel/l0/kmain.c index 8cb370a..97b5a97 100644 --- a/kernel/l0/kmain.c +++ b/kernel/l0/kmain.c @@ -31,10 +31,12 @@ void test_pf_handler(pagedir_t *pd, region_info_t *i, void* addr) { void* page_alloc_fun_for_kmalloc(size_t bytes) { void* addr = region_alloc(bytes, REGION_T_CORE_HEAP, test_pf_handler); + dbg_printf("Alloc %p bytes for kmalloc at: %p\n", bytes, addr); return addr; } void page_free_fun_for_kmalloc(void* ptr) { region_info_t *i = find_region(ptr); + ASSERT(i != 0 && i->type == REGION_T_CORE_HEAP); for (void* x = i->addr; x < i->addr + i->size; x += PAGE_SIZE) { uint32_t f = pd_get_frame(x); if (f != 0) { diff --git a/kernel/l0/paging.c b/kernel/l0/paging.c index adb076c..5000c71 100644 --- a/kernel/l0/paging.c +++ b/kernel/l0/paging.c @@ -67,7 +67,7 @@ void page_fault_handler(registers_t *regs) { dbg_printf("For pt 0x%p, page 0x%p -> addr 0x%p\n", pt, page, ((pt * 1024) + page) * PAGE_SIZE); for (int i = 0; i < N_PAGES_IN_PT; i++) { - dbg_printf("%i. 0x%p\n", i, kernel_pd.page[i]); + //dbg_printf("%i. 0x%p\n", i, kernel_pd.page[i]); } dbg_dump_registers(regs); |