mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
More memory mapping functions for libgcm
This commit is contained in:
parent
509d46a544
commit
48726e8fed
3 changed files with 90 additions and 68 deletions
|
@ -686,6 +686,19 @@ u64 VirtualMemoryBlock::getRealAddr(u64 addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
u64 VirtualMemoryBlock::getMappedAddress(u64 realAddress)
|
||||
{
|
||||
for(u32 i=0; i<m_mapped_memory.GetCount(); ++i)
|
||||
{
|
||||
if(realAddress >= m_mapped_memory[i].realAddress && realAddress < m_mapped_memory[i].realAddress + m_mapped_memory[i].size)
|
||||
{
|
||||
return m_mapped_memory[i].addr + (realAddress - m_mapped_memory[i].realAddress);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void VirtualMemoryBlock::Delete()
|
||||
{
|
||||
m_mapped_memory.Clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue