diff --git a/include/memory.hpp b/include/memory.hpp index 06b0c54f..94d821ff 100644 --- a/include/memory.hpp +++ b/include/memory.hpp @@ -224,6 +224,8 @@ public: return fcramApplicationSize; } + u32 getTotalAppFcramSize() { return fcramApplicationSize; } + enum class BatteryLevel { Empty = 0, AlmostEmpty, OneBar, TwoBars, ThreeBars, FourBars }; diff --git a/src/core/kernel/resource_limits.cpp b/src/core/kernel/resource_limits.cpp index 014787c7..f6f89fb4 100644 --- a/src/core/kernel/resource_limits.cpp +++ b/src/core/kernel/resource_limits.cpp @@ -88,7 +88,7 @@ s32 Kernel::getCurrentResourceValue(const KernelObject* limit, u32 resourceName) u32 Kernel::getMaxForResource(const KernelObject* limit, u32 resourceName) { switch (resourceName) { - case ResourceType::Commit: return appResourceLimits.maxCommit; + case ResourceType::Commit: return mem.getTotalAppFcramSize(); case ResourceType::Thread: return appResourceLimits.maxThreads; default: Helpers::panic("Attempted to get the max of unknown kernel resource: %d\n", resourceName); }