pm/romfs: first (broken?) pass at dynamic heap.

I cannot wait to figure out all the ways this is wrong.
This commit is contained in:
Michael Scire
2023-05-09 23:47:25 -07:00
parent 94f69276cd
commit 6eec927ad8
9 changed files with 151 additions and 20 deletions

View File

@@ -257,8 +257,10 @@ namespace ams::pm::impl {
u64 mitm_boost_size = 0;
R_TRY(mitm::pm::PrepareLaunchProgram(std::addressof(mitm_boost_size), program_info.program_id, override_status, is_application));
R_ABORT_UNLESS(BoostSystemMemoryResourceLimitForMitm(mitm_boost_size));
ON_RESULT_FAILURE_2 { R_ABORT_UNLESS(BoostSystemMemoryResourceLimitForMitm(0)); };
if (mitm_boost_size > 0 || is_application) {
R_ABORT_UNLESS(BoostSystemMemoryResourceLimitForMitm(mitm_boost_size));
ON_RESULT_FAILURE_2 { R_ABORT_UNLESS(BoostSystemMemoryResourceLimitForMitm(0)); };
}
/* Ensure resources are available. */
resource::WaitResourceAvailable(std::addressof(program_info));