Memory related code optimization

This commit is contained in:
Alex
2022-12-05 00:48:41 +02:00
parent f34278891b
commit 2d1c42fbcd
9 changed files with 123 additions and 57 deletions

View File

@ -224,6 +224,7 @@ namespace Memory
void UnreservePages(void *Address, uint64_t PageCount);
public:
Bitmap GetPageBitmap() { return PageBitmap; }
/**
* @brief Get Total Memory
*
@ -338,6 +339,7 @@ namespace Memory
NewLock(MemoryLock);
PageTable *Table = nullptr;
public:
class PageMapIndexer
{
public:
@ -348,7 +350,6 @@ namespace Memory
PageMapIndexer(uint64_t VirtualAddress);
};
public:
/**
* @brief Check if page is present
*
@ -393,6 +394,15 @@ namespace Memory
*/
void Unmap(void *VirtualAddress, uint64_t PageCount);
/**
* @brief Remap page.
*
* @param VirtualAddress Virtual address of the page.
* @param PhysicalAddress Physical address of the page.
* @param Flags Flags of the page. Check PTFlag enum.
*/
void Remap(void *VirtualAddress, void *PhysicalAddress, uint64_t Flags);
/**
* @brief Construct a new Virtual object
*