Added a Page::IsAligned inline function.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-03-26 16:46:26 +02:00
parent 9ab0bc5474
commit 554b2e44cc
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ namespace Sortix
// Rounds a memory address up to nearest page.
inline addr_t AlignUp(addr_t page) { return AlignDown(page + 0xFFFUL); }
// Tests whether an address is page aligned.
inline bool IsAligned(addr_t page) { return AlignDown(page) == page; }
}
namespace Memory