diff --git a/nasa-tables/mem_ctx/mem_ctx.cpp b/nasa-tables/mem_ctx/mem_ctx.cpp index f767947..7ca9467 100644 --- a/nasa-tables/mem_ctx/mem_ctx.cpp +++ b/nasa-tables/mem_ctx/mem_ctx.cpp @@ -76,8 +76,11 @@ namespace nasa mem_ctx::~mem_ctx() { - set_pml4e(reinterpret_cast<::ppml4e>(get_dirbase()) + this->pml4e_index, pml4e{NULL}); - while (!SwitchToThread()); + const auto pml4 = + reinterpret_cast( + set_page(dirbase)); + + pml4[pml4e_index] = pml4e{ NULL }; } void* mem_ctx::set_page(void* addr)