diff --git a/include/stdio.h b/include/stdio.h index 40bc973..7ee13e2 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -14,7 +14,7 @@ int printf(const char* __restrict, ...); int putchar(int); int puts(const char*); -#define KATAU_DEBUG +//#define KATAU_DEBUG #ifdef KATAU_DEBUG #define debug_log printf diff --git a/src/mm/page_alloc.c b/src/mm/page_alloc.c index b3bd459..4995a07 100644 --- a/src/mm/page_alloc.c +++ b/src/mm/page_alloc.c @@ -61,7 +61,7 @@ void* alloc_page() { if(page_num == 0) continue; - printf("allocating page %X\n", page_num * PAGE_SIZE); + debug_log("allocating page %X\n", page_num * PAGE_SIZE); page_bitmap[i] |= (1 << j); // Помечаем как занятый return (void*)(page_num * PAGE_SIZE); diff --git a/src/mm/paging.c b/src/mm/paging.c index 72528e8..8535252 100644 --- a/src/mm/paging.c +++ b/src/mm/paging.c @@ -174,7 +174,7 @@ void destroy_page_dir(uint32_t* page_dir_virt) { // If the page table entry is present, free the physical page (frame) it points to if (pte & PAGE_PRESENT) { - printf("freeing page %X\n", pte); + debug_log("freeing page %X\n", pte); free_page((void*)(pte & ~0xFFF)); } } @@ -187,6 +187,6 @@ void destroy_page_dir(uint32_t* page_dir_virt) { // Finally, free the page directory itself. // We need its physical address to pass to the physical memory manager. - printf("freeing PD page %X\n", virt_to_phys(page_dir_virt)); + debug_log("freeing PD page %X\n", virt_to_phys(page_dir_virt)); free_page((void*)virt_to_phys(page_dir_virt)); } \ No newline at end of file