From d3634d4bf4b1cbd8cc4fe6f22178054803b41e23 Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 12 May 2015 15:25:15 -0500 Subject: Core/ResourceLimits: Implemented the basic structure of ResourceLimits. Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues. Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create. --- src/core/loader/3dsx.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/loader/3dsx.cpp') diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 84b13ee5..ad5e929c 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp @@ -9,6 +9,7 @@ #include "core/file_sys/archive_romfs.h" #include "core/hle/kernel/process.h" +#include "core/hle/kernel/resource_limit.h" #include "core/hle/service/fs/archive.h" #include "core/loader/elf.h" #include "core/loader/ncch.h" @@ -233,6 +234,9 @@ ResultStatus AppLoader_THREEDSX::Load() { Kernel::g_current_process = Kernel::Process::Create(filename, 0); Kernel::g_current_process->svc_access_mask.set(); Kernel::g_current_process->address_mappings = default_address_mappings; + + // Attach the default resource limit (APPLICATION) to the process + Kernel::g_current_process->resource_limit = Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); Load3DSXFile(*file, Memory::PROCESS_IMAGE_VADDR); -- cgit v1.2.3