summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorMichael Scire <SciresM@gmail.com>2019-07-07 20:48:11 +0200
committerMichael Scire <SciresM@gmail.com>2019-07-07 20:48:11 +0200
commit1689784c198f6a7f3c389d4cd5edeccc74c1d9f3 (patch)
tree66fed74508274f801f37e08d5bc405227776cf4c /src/core/hle/kernel/process.h
parentImplement MapPhysicalMemory/UnmapPhysicalMemory (diff)
downloadyuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.gz
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.bz2
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.lz
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.xz
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.zst
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/process.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index b0e795577..3196014da 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -173,6 +173,21 @@ public:
return system_resource_size;
}
+ /// Gets the amount of secure memory currently in use for memory management.
+ u32 GetSystemResourceUsage() const {
+ // On hardware, this returns the amount of system resource memory that has
+ // been used by the kernel. This is problematic for Yuzu to emulate, because
+ // system resource memory is used for page tables -- and yuzu doesn't really
+ // have a way to calculate how much memory is required for page tables for
+ // the current process at any given time.
+ // TODO: Is this even worth implementing? Games may retrieve this value via
+ // an SDK function that gets used + available system resource size for debug
+ // or diagnostic purposes. However, it seems unlikely that a game would make
+ // decisions based on how much system memory is dedicated to its page tables.
+ // Is returning a value other than zero wise?
+ return 0;
+ }
+
/// Whether this process is an AArch64 or AArch32 process.
bool Is64BitProcess() const {
return is_64bit_process;
@@ -197,15 +212,15 @@ public:
u64 GetTotalPhysicalMemoryAvailable() const;
/// Retrieves the total physical memory available to this process in bytes,
- /// without the size of the personal heap added to it.
- u64 GetTotalPhysicalMemoryAvailableWithoutMmHeap() const;
+ /// without the size of the personal system resource heap added to it.
+ u64 GetTotalPhysicalMemoryAvailableWithoutSystemResource() const;
/// Retrieves the total physical memory used by this process in bytes.
u64 GetTotalPhysicalMemoryUsed() const;
/// Retrieves the total physical memory used by this process in bytes,
- /// without the size of the personal heap added to it.
- u64 GetTotalPhysicalMemoryUsedWithoutMmHeap() const;
+ /// without the size of the personal system resource heap added to it.
+ u64 GetTotalPhysicalMemoryUsedWithoutSystemResource() const;
/// Gets the list of all threads created with this process as their owner.
const std::list<const Thread*>& GetThreadList() const {