summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorGravatar Michael Scire2019-07-07 11:48:11 -0700
committerGravatar Michael Scire2019-07-07 11:48:11 -0700
commit1689784c198f6a7f3c389d4cd5edeccc74c1d9f3 (patch)
tree66fed74508274f801f37e08d5bc405227776cf4c /src/core/hle/kernel/process.h
parentImplement MapPhysicalMemory/UnmapPhysicalMemory (diff)
downloadyuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.gz
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.xz
yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.zip
address review commentary
Diffstat (limited to 'src/core/hle/kernel/process.h')
-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:
173 return system_resource_size; 173 return system_resource_size;
174 } 174 }
175 175
176 /// Gets the amount of secure memory currently in use for memory management.
177 u32 GetSystemResourceUsage() const {
178 // On hardware, this returns the amount of system resource memory that has
179 // been used by the kernel. This is problematic for Yuzu to emulate, because
180 // system resource memory is used for page tables -- and yuzu doesn't really
181 // have a way to calculate how much memory is required for page tables for
182 // the current process at any given time.
183 // TODO: Is this even worth implementing? Games may retrieve this value via
184 // an SDK function that gets used + available system resource size for debug
185 // or diagnostic purposes. However, it seems unlikely that a game would make
186 // decisions based on how much system memory is dedicated to its page tables.
187 // Is returning a value other than zero wise?
188 return 0;
189 }
190
176 /// Whether this process is an AArch64 or AArch32 process. 191 /// Whether this process is an AArch64 or AArch32 process.
177 bool Is64BitProcess() const { 192 bool Is64BitProcess() const {
178 return is_64bit_process; 193 return is_64bit_process;
@@ -197,15 +212,15 @@ public:
197 u64 GetTotalPhysicalMemoryAvailable() const; 212 u64 GetTotalPhysicalMemoryAvailable() const;
198 213
199 /// Retrieves the total physical memory available to this process in bytes, 214 /// Retrieves the total physical memory available to this process in bytes,
200 /// without the size of the personal heap added to it. 215 /// without the size of the personal system resource heap added to it.
201 u64 GetTotalPhysicalMemoryAvailableWithoutMmHeap() const; 216 u64 GetTotalPhysicalMemoryAvailableWithoutSystemResource() const;
202 217
203 /// Retrieves the total physical memory used by this process in bytes. 218 /// Retrieves the total physical memory used by this process in bytes.
204 u64 GetTotalPhysicalMemoryUsed() const; 219 u64 GetTotalPhysicalMemoryUsed() const;
205 220
206 /// Retrieves the total physical memory used by this process in bytes, 221 /// Retrieves the total physical memory used by this process in bytes,
207 /// without the size of the personal heap added to it. 222 /// without the size of the personal system resource heap added to it.
208 u64 GetTotalPhysicalMemoryUsedWithoutMmHeap() const; 223 u64 GetTotalPhysicalMemoryUsedWithoutSystemResource() const;
209 224
210 /// Gets the list of all threads created with this process as their owner. 225 /// Gets the list of all threads created with this process as their owner.
211 const std::list<const Thread*>& GetThreadList() const { 226 const std::list<const Thread*>& GetThreadList() const {