1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

Kernel: Convert a bunch of String::format() => String::formatted()

This commit is contained in:
Andreas Kling 2021-01-11 22:07:01 +01:00
parent 0ae9ae48fa
commit 7c4ddecacb
14 changed files with 22 additions and 33 deletions

View file

@ -52,7 +52,7 @@ void PhysicalPage::return_to_freelist() const
MM.deallocate_user_physical_page(*this);
#ifdef MM_DEBUG
dbg() << "MM: P" << String::format("%x", m_paddr.get()) << " released to freelist";
dbgln("MM: {} released to freelist", m_paddr);
#endif
}

View file

@ -107,7 +107,7 @@ private:
inline const LogStream& operator<<(const LogStream& stream, const Range& value)
{
return stream << String::format("Range(%x-%x)", value.base().get(), value.end().get() - 1);
return stream << String::formatted("Range({:08x}-{:08x})", value.base().get(), value.end().get() - 1);
}
}

View file

@ -382,10 +382,6 @@ void Region::unmap(ShouldDeallocateVirtualMemoryRange deallocate_range)
for (size_t i = 0; i < count; ++i) {
auto vaddr = vaddr_from_page_index(i);
MM.release_pte(*m_page_directory, vaddr, i == count - 1);
#ifdef MM_DEBUG
auto* page = physical_page(i);
dbg() << "MM: >> Unmapped " << vaddr << " => P" << String::format("%p", (void*)(page ? page->paddr().get() : 0)) << " <<";
#endif
}
MM.flush_tlb(m_page_directory, vaddr(), page_count());
if (deallocate_range == ShouldDeallocateVirtualMemoryRange::Yes) {