mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
AlignDown and AlignUp aligns an address on a page boundary.
This commit is contained in:
parent
e78443d92a
commit
412d3e78b2
1 changed files with 3 additions and 0 deletions
|
@ -34,6 +34,9 @@ namespace Sortix
|
|||
#endif
|
||||
addr_t Get();
|
||||
void Put(addr_t Page);
|
||||
|
||||
inline addr_t AlignDown(addr_t page) { return page & ~(0xFFFUL); }
|
||||
inline addr_t AlignUp(addr_t page) { return AlignDown(page + 0xFFFUL); }
|
||||
}
|
||||
|
||||
namespace VirtualMemory
|
||||
|
|
Loading…
Reference in a new issue