From 0890451c554973b907dc8febe6e65b499f21ab09 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Nov 2020 19:43:24 -0500 Subject: page_table: Remove unnecessary header inclusions Prevents indirect inclusions for these headers. --- src/common/page_table.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/common/page_table.h') diff --git a/src/common/page_table.h b/src/common/page_table.h index cf5eed780..9908947ac 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -4,10 +4,6 @@ #pragma once -#include - -#include - #include "common/common_types.h" #include "common/memory_hook.h" #include "common/virtual_buffer.h" -- cgit v1.2.3 From 3cfd962ef471fa064f0f72eceff2a592e37b6642 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Nov 2020 19:45:17 -0500 Subject: page_table: Add missing doxygen parameters to Resize() Resolves two -Wdocumentation warnings. --- src/common/page_table.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common/page_table.h') diff --git a/src/common/page_table.h b/src/common/page_table.h index 9908947ac..a5be7a668 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -54,6 +54,8 @@ struct PageTable { * a given address space. * * @param address_space_width_in_bits The address size width in bits. + * @param page_size_in_bits The page size in bits. + * @param has_attribute Whether or not this page has any backing attributes. */ void Resize(std::size_t address_space_width_in_bits, std::size_t page_size_in_bits, bool has_attribute); -- cgit v1.2.3 From b3c8997829ed986c948d195bc1e7c8f66c42755e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Nov 2020 19:58:41 -0500 Subject: page_table: Allow page tables to be moved Makes page tables and virtual buffers able to be moved, but not copied, making the interface more flexible. Previously, with the destructor specified, but no move assignment or constructor specified, they wouldn't be implicitly generated. --- src/common/page_table.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/common/page_table.h') diff --git a/src/common/page_table.h b/src/common/page_table.h index a5be7a668..9754fabf9 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -4,6 +4,8 @@ #pragma once +#include + #include "common/common_types.h" #include "common/memory_hook.h" #include "common/virtual_buffer.h" @@ -47,7 +49,13 @@ struct SpecialRegion { */ struct PageTable { PageTable(); - ~PageTable(); + ~PageTable() noexcept; + + PageTable(const PageTable&) = delete; + PageTable& operator=(const PageTable&) = delete; + + PageTable(PageTable&&) noexcept = default; + PageTable& operator=(PageTable&&) noexcept = default; /** * Resizes the page table to be able to accomodate enough pages within -- cgit v1.2.3