mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
RealToVirtualAddr became vm::get_addr()
This commit is contained in:
parent
c4558d2ca7
commit
5195b2b1b4
9 changed files with 61 additions and 58 deletions
|
@ -52,6 +52,20 @@ namespace vm
|
|||
return g_locations[location].deallocator(addr);
|
||||
}
|
||||
|
||||
u32 get_addr(const void* real_pointer)
|
||||
{
|
||||
const u64 diff = (u64)real_pointer - (u64)g_base_addr;
|
||||
const u32 res = (u32)diff;
|
||||
|
||||
if (res == diff)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
||||
assert(!real_pointer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
namespace ps3
|
||||
{
|
||||
u32 main_alloc(u32 size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue