mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 13:42:55 +00:00
Fix heap space issues
This commit is contained in:
parent
a9ee35965b
commit
75e6abe9d5
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "std_include.hpp"
|
|
||||||
|
|
||||||
extern "C"
|
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()
|
ept::~ept()
|
||||||
{
|
{
|
||||||
|
@ -77,9 +77,9 @@ namespace vmx
|
|||||||
static void free_translation_hints(ept_translation_hint* hints);
|
static void free_translation_hints(ept_translation_hint* hints);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLSPEC_PAGE_ALIGN pml4 epml4[EPT_PML4E_ENTRY_COUNT]{};
|
DECLSPEC_PAGE_ALIGN pml4 epml4[EPT_PML4E_ENTRY_COUNT];
|
||||||
DECLSPEC_PAGE_ALIGN pml3 epdpt[EPT_PDPTE_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 pml2 epde[EPT_PDPTE_ENTRY_COUNT][EPT_PDE_ENTRY_COUNT];
|
||||||
|
|
||||||
ept_split* ept_splits{nullptr};
|
ept_split* ept_splits{nullptr};
|
||||||
ept_hook* ept_hooks{nullptr};
|
ept_hook* ept_hooks{nullptr};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user