summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-03 14:33:59 -0400
committerGravatar Lioncash2018-08-03 14:45:45 -0400
commit2beda7c2b3d2fe70ff36edf178d9bb2f5b308bf9 (patch)
tree8decd2e8d79f579920f1da76190b46a68eac5f88 /src/core/hle/kernel/process.cpp
parentMerge pull request #908 from lioncash/memory (diff)
downloadyuzu-2beda7c2b3d2fe70ff36edf178d9bb2f5b308bf9.tar.gz
yuzu-2beda7c2b3d2fe70ff36edf178d9bb2f5b308bf9.tar.xz
yuzu-2beda7c2b3d2fe70ff36edf178d9bb2f5b308bf9.zip
kernel/process: Use accessors instead of class members for referencing segment array
Using member variables for referencing the segments array increases the size of the class in memory for little benefit. The same behavior can be achieved through the use of accessors that just return the relevant segment.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index 5403ceef5..edf34c5a3 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -142,9 +142,9 @@ void Process::LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr) {
142 }; 142 };
143 143
144 // Map CodeSet segments 144 // Map CodeSet segments
145 MapSegment(module_->code, VMAPermission::ReadExecute, MemoryState::CodeStatic); 145 MapSegment(module_->CodeSegment(), VMAPermission::ReadExecute, MemoryState::CodeStatic);
146 MapSegment(module_->rodata, VMAPermission::Read, MemoryState::CodeMutable); 146 MapSegment(module_->RODataSegment(), VMAPermission::Read, MemoryState::CodeMutable);
147 MapSegment(module_->data, VMAPermission::ReadWrite, MemoryState::CodeMutable); 147 MapSegment(module_->DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeMutable);
148} 148}
149 149
150ResultVal<VAddr> Process::HeapAllocate(VAddr target, u64 size, VMAPermission perms) { 150ResultVal<VAddr> Process::HeapAllocate(VAddr target, u64 size, VMAPermission perms) {