More cleanup

This commit is contained in:
wheremyfoodat 2025-08-03 18:13:52 +03:00
commit fe06d02baf
2 changed files with 3 additions and 5 deletions

View file

@ -102,10 +102,6 @@ namespace KernelMemoryTypes {
}; };
} // namespace KernelMemoryTypes } // namespace KernelMemoryTypes
struct FcramBlock;
class KFcram;
enum class FcramRegion;
class Memory { class Memory {
// Used internally by changeMemoryState // Used internally by changeMemoryState
struct Operation { struct Operation {

View file

@ -82,7 +82,9 @@ void Kernel::getResourceLimitCurrentValues() {
s32 Kernel::getCurrentResourceValue(const KernelObject* limit, u32 resourceName) { s32 Kernel::getCurrentResourceValue(const KernelObject* limit, u32 resourceName) {
const auto data = static_cast<ResourceLimits*>(limit->data); const auto data = static_cast<ResourceLimits*>(limit->data);
switch (resourceName) { switch (resourceName) {
case ResourceType::Commit: return fcramManager.getUsedCount(FcramRegion::App) << 12; // TODO: needs to use the current amount of memory allocated by the process // TODO: needs to use the current amount of memory allocated by the process
case ResourceType::Commit: return fcramManager.getUsedCount(FcramRegion::App) * Memory::pageSize;
case ResourceType::Thread: return threadIndices.size(); case ResourceType::Thread: return threadIndices.size();
default: Helpers::panic("Attempted to get current value of unknown kernel resource: %d\n", resourceName); default: Helpers::panic("Attempted to get current value of unknown kernel resource: %d\n", resourceName);
} }