PageTable: move backing addresses to a children class as the CPU page table does not need them.

This PR aims to reduce the memory usage in the CPU page table by moving
GPU specific parameters into a child class. This saves 1Gb of Memory for
most games.
This commit is contained in:
Fernando Sahmkow 2020-03-13 16:33:47 -04:00 committed by FernandoS27
parent b30b1f741d
commit 27cbb75e7c
3 changed files with 25 additions and 4 deletions

View file

@ -76,9 +76,20 @@ struct PageTable {
*/
std::vector<PageType> attributes;
std::vector<u64> backing_addr;
const std::size_t page_size_in_bits{};
};
/**
* A more advanced Page Table with the ability to save a backing address when using it
* depends on another MMU.
*/
struct BackingPageTable : PageTable {
explicit BackingPageTable(std::size_t page_size_in_bits);
~BackingPageTable();
void Resize(std::size_t address_space_width_in_bits);
std::vector<u64> backing_addr;
};
} // namespace Common