diff --git a/kernel/src/Memory/Paging.hpp b/kernel/src/Memory/Paging.hpp index 7cce132..b15db33 100644 --- a/kernel/src/Memory/Paging.hpp +++ b/kernel/src/Memory/Paging.hpp @@ -43,13 +43,9 @@ namespace Memory::VMM { struct VirtualAddress { std::uint64_t address; - VirtualAddress(std::uint64_t newAddress) { - if (newAddress % 0x1000 != 0) { - Kt::KernelLogStream(Kt::WARNING, "VMM") << "VirtualAddress object created with non-aligned value."; - } - - address = newAddress; - } + // Page-table index extraction works for any byte address. Callers that + // truly require page alignment validate that explicitly before mapping. + VirtualAddress(std::uint64_t newAddress) : address(newAddress) {} uint64_t GetL4Index() { return (address >> 39) & 0x1ff;