Fix Resource Limit max commit size

This commit is contained in:
wheremyfoodat 2023-09-07 01:27:56 +03:00
parent 5b42834f8e
commit 0b41ecaa18
2 changed files with 3 additions and 1 deletions

View file

@ -224,6 +224,8 @@ public:
return fcramApplicationSize;
}
u32 getTotalAppFcramSize() { return fcramApplicationSize; }
enum class BatteryLevel {
Empty = 0, AlmostEmpty, OneBar, TwoBars, ThreeBars, FourBars
};

View file

@ -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);
}