mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Memory Tracker: If PageTable is nullptr, read the current one
This commit is contained in:
parent
32e8eecc69
commit
013b635524
@ -36,7 +36,10 @@ namespace Memory
|
|||||||
|
|
||||||
Tracker::Tracker(PageTable4 *PageTable)
|
Tracker::Tracker(PageTable4 *PageTable)
|
||||||
{
|
{
|
||||||
this->PageTable = PageTable;
|
if (PageTable)
|
||||||
|
this->PageTable = PageTable;
|
||||||
|
else
|
||||||
|
this->PageTable = (PageTable4 *)CPU::x64::readcr3().raw;
|
||||||
debug("Tracker initialized.");
|
debug("Tracker initialized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +651,7 @@ namespace Memory
|
|||||||
void *RequestPages(uint64_t Count);
|
void *RequestPages(uint64_t Count);
|
||||||
void FreePages(void *Address, uint64_t Count);
|
void FreePages(void *Address, uint64_t Count);
|
||||||
|
|
||||||
Tracker(PageTable4 *PageTable);
|
Tracker(PageTable4 *PageTable = nullptr);
|
||||||
~Tracker();
|
~Tracker();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user