summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-03-28 23:52:45 +0100
committerLioncash <mathew1800@gmail.com>2019-03-29 03:51:17 +0100
commit2289e895aa63cdb391795c573b96b1880c31f097 (patch)
tree67ed72e074467a3ad6d1009fa10e2c8e1df2833d
parentkernel/process: Store the main thread stack size to a data member (diff)
downloadyuzu-2289e895aa63cdb391795c573b96b1880c31f097.tar
yuzu-2289e895aa63cdb391795c573b96b1880c31f097.tar.gz
yuzu-2289e895aa63cdb391795c573b96b1880c31f097.tar.bz2
yuzu-2289e895aa63cdb391795c573b96b1880c31f097.tar.lz
yuzu-2289e895aa63cdb391795c573b96b1880c31f097.tar.xz
yuzu-2289e895aa63cdb391795c573b96b1880c31f097.tar.zst
yuzu-2289e895aa63cdb391795c573b96b1880c31f097.zip
-rw-r--r--src/core/hle/kernel/process.cpp2
-rw-r--r--src/core/hle/kernel/process.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index bb2673732..819d2cb0b 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -228,6 +228,8 @@ void Process::LoadModule(CodeSet module_, VAddr base_addr) {
MapSegment(module_.RODataSegment(), VMAPermission::Read, MemoryState::CodeData);
MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeData);
+ code_memory_size += module_.memory->size();
+
// Clear instruction cache in CPU JIT
system.InvalidateCpuInstructionCaches();
}
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index ee559fe4c..16193ca56 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -250,6 +250,9 @@ private:
/// Size of the main thread's stack in bytes.
u64 main_thread_stack_size = 0;
+ /// Size of the loaded code memory in bytes.
+ u64 code_memory_size = 0;
+
/// Current status of the process
ProcessStatus status;