mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 05:32:55 +00:00
Fix heap space issues
This commit is contained in:
parent
a9ee35965b
commit
75e6abe9d5
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include "std_include.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -76,7 +76,14 @@ namespace vmx
|
||||
}
|
||||
}
|
||||
|
||||
ept::ept() = default;
|
||||
ept::ept()
|
||||
{
|
||||
// Directly initializing these fields kills the compiler ._.
|
||||
// https://developercommunity.visualstudio.com/t/clexe-using-20gb-of-memory-compiling-small-file-in/407999
|
||||
memset(this->epml4, 0, sizeof(this->epml4));
|
||||
memset(this->epdpt, 0, sizeof(this->epdpt));
|
||||
memset(this->epde, 0, sizeof(this->epde));
|
||||
}
|
||||
|
||||
ept::~ept()
|
||||
{
|
||||
|
@ -77,9 +77,9 @@ namespace vmx
|
||||
static void free_translation_hints(ept_translation_hint* hints);
|
||||
|
||||
private:
|
||||
DECLSPEC_PAGE_ALIGN pml4 epml4[EPT_PML4E_ENTRY_COUNT]{};
|
||||
DECLSPEC_PAGE_ALIGN pml3 epdpt[EPT_PDPTE_ENTRY_COUNT]{};
|
||||
DECLSPEC_PAGE_ALIGN pml2 epde[EPT_PDPTE_ENTRY_COUNT][EPT_PDE_ENTRY_COUNT]{};
|
||||
DECLSPEC_PAGE_ALIGN pml4 epml4[EPT_PML4E_ENTRY_COUNT];
|
||||
DECLSPEC_PAGE_ALIGN pml3 epdpt[EPT_PDPTE_ENTRY_COUNT];
|
||||
DECLSPEC_PAGE_ALIGN pml2 epde[EPT_PDPTE_ENTRY_COUNT][EPT_PDE_ENTRY_COUNT];
|
||||
|
||||
ept_split* ept_splits{nullptr};
|
||||
ept_hook* ept_hooks{nullptr};
|
||||
|
Loading…
x
Reference in New Issue
Block a user