ro: implement rest of LoadNrr/LoadNrrEx

This commit is contained in:
Michael Scire 2019-04-21 05:28:57 -07:00
parent cb88fdfd62
commit 4ba6d8b24c
7 changed files with 589 additions and 32 deletions

View file

@ -70,7 +70,7 @@ Result MapUtils::LocateSpaceForMapModern(u64 *out, u64 out_size) {
cur_base = address_space.map_end;
} else {
if (R_FAILED(svcQueryMemory(&mem_info, &page_info, cur_base))) {
/* TODO: panic. */
std::abort();
}
if (mem_info.type == 0 && mem_info.addr - cur_base + mem_info.size >= out_size) {
*out = cur_base;
@ -105,7 +105,7 @@ Result MapUtils::LocateSpaceForMapDeprecated(u64 *out, u64 out_size) {
rc = ResultKernelOutOfMemory;
while (true) {
if (mem_info.type == 0x10) {
return rc;
return rc;
}
if (mem_info.type == 0 && mem_info.addr - cur_base + mem_info.size >= out_size) {
*out = cur_base;