MemoryManager: Fix logging when built with debug logging

That is to say, -DMM_DEBUG
This commit is contained in:
apio 2022-10-12 14:29:30 +02:00
parent 4021cb3ac0
commit eaea4603c6

View File

@ -158,13 +158,13 @@ void* MemoryManager::get_pages_at(uint64_t addr, uint64_t count, int flags)
// smaller range, so this might not be fatal.
{
#ifdef MM_DEBUG
kwarnln("OOM while allocating page %ld of memory. this might be recoverable...");
kwarnln("OOM while allocating page %ld of memory. this might be recoverable...", i);
#endif
return 0;
}
kernelVMM.map(addr + (i * PAGE_SIZE), (uint64_t)physicalAddress, flags);
#ifdef MM_DEBUG
kdbgln("allocating virtual %lx, physical %p", virtualAddress + (i * PAGE_SIZE), physicalAddress);
kdbgln("allocating virtual %lx, physical %p", addr + (i * PAGE_SIZE), physicalAddress);
#endif
}
return (void*)addr;