|
|
@ -8,10 +8,13 @@ namespace nasa
|
|
|
|
dirbase(get_dirbase(v_ctx, pid)),
|
|
|
|
dirbase(get_dirbase(v_ctx, pid)),
|
|
|
|
pid(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)
|
|
|
|
for (auto idx = 100u; idx > 0u; --idx)
|
|
|
|
if (!v_ctx.rkm<pml4e>(v_ctx.get_virtual((
|
|
|
|
if (!v_ctx.rkm<pml4e>(current_pml4 + (idx * sizeof pml4e)).value)
|
|
|
|
reinterpret_cast<std::uintptr_t>(get_dirbase()) + idx))).value)
|
|
|
|
|
|
|
|
this->pml4e_index = idx;
|
|
|
|
this->pml4e_index = idx;
|
|
|
|
|
|
|
|
|
|
|
|
// allocate a pdpt
|
|
|
|
// allocate a pdpt
|
|
|
|