diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-01 11:54:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-01 11:54:01 +0100 |
commit | eb318ffffc5007c35c42826e23945a82c24900b1 (patch) | |
tree | 95a401077534f48f0e6a92a269321ff9ad7aec45 /src/common/page_table.cpp | |
parent | Merge pull request #5239 from FearlessTobi/enable-translation (diff) | |
parent | core/memory: Read and write page table atomically (diff) | |
download | yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.tar yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.tar.gz yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.tar.bz2 yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.tar.lz yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.tar.xz yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.tar.zst yuzu-eb318ffffc5007c35c42826e23945a82c24900b1.zip |
Diffstat (limited to 'src/common/page_table.cpp')
-rw-r--r-- | src/common/page_table.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/common/page_table.cpp b/src/common/page_table.cpp index bccea0894..8fd8620fd 100644 --- a/src/common/page_table.cpp +++ b/src/common/page_table.cpp @@ -10,16 +10,10 @@ PageTable::PageTable() = default; PageTable::~PageTable() noexcept = default; -void PageTable::Resize(std::size_t address_space_width_in_bits, std::size_t page_size_in_bits, - bool has_attribute) { - const std::size_t num_page_table_entries{1ULL - << (address_space_width_in_bits - page_size_in_bits)}; +void PageTable::Resize(size_t address_space_width_in_bits, size_t page_size_in_bits) { + const size_t num_page_table_entries{1ULL << (address_space_width_in_bits - page_size_in_bits)}; pointers.resize(num_page_table_entries); backing_addr.resize(num_page_table_entries); - - if (has_attribute) { - attributes.resize(num_page_table_entries); - } } } // namespace Common |