|
|
|
@ -8,11 +8,14 @@ namespace nasa
|
|
|
|
|
dirbase(get_dirbase(v_ctx, pid)),
|
|
|
|
|
pid(pid)
|
|
|
|
|
{
|
|
|
|
|
// find an empty pml4e...
|
|
|
|
|
// find an empty pml4e inside of current processes pml4...
|
|
|
|
|
const auto current_pml4 =
|
|
|
|
|
v_ctx.get_virtual(reinterpret_cast<std::uintptr_t>(
|
|
|
|
|
get_dirbase(v_ctx, GetCurrentProcessId())));
|
|
|
|
|
|
|
|
|
|
for (auto idx = 100u; idx > 0u; --idx)
|
|
|
|
|
if (!v_ctx.rkm<pml4e>(v_ctx.get_virtual((
|
|
|
|
|
reinterpret_cast<std::uintptr_t>(get_dirbase()) + idx))).value)
|
|
|
|
|
this->pml4e_index = idx;
|
|
|
|
|
if (!v_ctx.rkm<pml4e>(current_pml4 + (idx * sizeof pml4e)).value)
|
|
|
|
|
this->pml4e_index = idx;
|
|
|
|
|
|
|
|
|
|
// allocate a pdpt
|
|
|
|
|
this->new_pdpt.second =
|
|
|
|
|