kernel/process: Store the total size of the code memory loaded
This will be necessary to properly report the used memory size in svcGetInfo.
This commit is contained in:
parent
5d4ab5ec2f
commit
2289e895aa
|
@ -228,6 +228,8 @@ void Process::LoadModule(CodeSet module_, VAddr base_addr) {
|
||||||
MapSegment(module_.RODataSegment(), VMAPermission::Read, MemoryState::CodeData);
|
MapSegment(module_.RODataSegment(), VMAPermission::Read, MemoryState::CodeData);
|
||||||
MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeData);
|
MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeData);
|
||||||
|
|
||||||
|
code_memory_size += module_.memory->size();
|
||||||
|
|
||||||
// Clear instruction cache in CPU JIT
|
// Clear instruction cache in CPU JIT
|
||||||
system.InvalidateCpuInstructionCaches();
|
system.InvalidateCpuInstructionCaches();
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,9 @@ private:
|
||||||
/// Size of the main thread's stack in bytes.
|
/// Size of the main thread's stack in bytes.
|
||||||
u64 main_thread_stack_size = 0;
|
u64 main_thread_stack_size = 0;
|
||||||
|
|
||||||
|
/// Size of the loaded code memory in bytes.
|
||||||
|
u64 code_memory_size = 0;
|
||||||
|
|
||||||
/// Current status of the process
|
/// Current status of the process
|
||||||
ProcessStatus status;
|
ProcessStatus status;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue