From d5f59b666a43571e40f5f0ddcd6767503924db63 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 8 Oct 2022 18:21:02 +0200 Subject: [PATCH] Kernel/Memory: Use %p in printf --- kernel/src/memory/MemoryManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index 075a867b..ada02b99 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -148,7 +148,7 @@ void* MemoryManager::get_pages_at(uint64_t addr, uint64_t count, int flags) if (!count) return 0; if (count == 1) return get_page_at(addr, flags); #ifdef MM_DEBUG - kdbgln("allocating several pages (%ld), at address %ld", count, addr); + kdbgln("allocating several pages (%ld), at address %lx", count, addr); #endif for (uint64_t i = 0; i < count; i++) { @@ -164,7 +164,7 @@ void* MemoryManager::get_pages_at(uint64_t addr, uint64_t count, int flags) } kernelVMM.map(addr + (i * PAGE_SIZE), (uint64_t)physicalAddress, flags); #ifdef MM_DEBUG - kdbgln("allocating virtual %lx, physical %lx", virtualAddress + (i * PAGE_SIZE), (uint64_t)physicalAddress); + kdbgln("allocating virtual %lx, physical %p", virtualAddress + (i * PAGE_SIZE), physicalAddress); #endif } return (void*)addr; @@ -184,7 +184,7 @@ void MemoryManager::release_pages(void* pages, uint64_t count) ASSERT(physicalAddress != UINT64_MAX); kernelVMM.unmap((uint64_t)page); #ifdef MM_DEBUG - kdbgln("releasing virtual %lx, physical %lx", (uint64_t)page, physicalAddress); + kdbgln("releasing virtual %p, physical %lx", page, physicalAddress); #endif PMM::free_page((void*)physicalAddress); }