mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 10:42:51 +00:00
Merge pull request #3292 from degasus/heap_space_fix
core/kernel: Fix GetTotalPhysicalMemoryUsed.
This commit is contained in:
commit
e749f17257
|
@ -317,6 +317,8 @@ void Process::FreeTLSRegion(VAddr tls_address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Process::LoadModule(CodeSet module_, VAddr base_addr) {
|
void Process::LoadModule(CodeSet module_, VAddr base_addr) {
|
||||||
|
code_memory_size += module_.memory.size();
|
||||||
|
|
||||||
const auto memory = std::make_shared<PhysicalMemory>(std::move(module_.memory));
|
const auto memory = std::make_shared<PhysicalMemory>(std::move(module_.memory));
|
||||||
|
|
||||||
const auto MapSegment = [&](const CodeSet::Segment& segment, VMAPermission permissions,
|
const auto MapSegment = [&](const CodeSet::Segment& segment, VMAPermission permissions,
|
||||||
|
@ -332,8 +334,6 @@ void Process::LoadModule(CodeSet module_, VAddr base_addr) {
|
||||||
MapSegment(module_.CodeSegment(), VMAPermission::ReadExecute, MemoryState::Code);
|
MapSegment(module_.CodeSegment(), VMAPermission::ReadExecute, MemoryState::Code);
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Process::Process(Core::System& system)
|
Process::Process(Core::System& system)
|
||||||
|
|
Loading…
Reference in a new issue