libstrat: fix compilation without pre-compiled header/without lto

This commit is contained in:
Michael Scire 2021-10-06 17:58:42 -07:00
parent 7ca83c9d3b
commit e8f1efd01b
37 changed files with 89 additions and 33 deletions

View file

@ -70,15 +70,18 @@ namespace ams::mem::impl {
uintptr_t addr;
if (IsVirtualAddressMemoryEnabled()) {
/* TODO: Support virtual address memory. */
AMS_UNUSED(ptr);
AMS_ABORT("Virtual address memory not supported yet");
} else {
if (auto err = ConvertResult(os::AllocateMemoryBlock(std::addressof(addr), util::AlignUp(size, os::MemoryBlockUnitSize))); err != 0) {
return err;
}
os::SetMemoryPermission(addr, size, os::MemoryPermission_None);
}
/* Set the output pointer. */
*ptr = reinterpret_cast<void *>(addr);
return 0;
}