diff options
author | Lioncash <mathew1800@gmail.com> | 2014-11-18 14:48:11 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2014-11-19 02:04:00 +0100 |
commit | 7cbecde2ca1b0ea3faf4caf384b6512cb9849162 (patch) | |
tree | 9ab722431792e984297aa71a10a0359e9aab80e4 /src/core/mem_map_funcs.cpp | |
parent | Merge pull request #200 from lioncash/statics (diff) | |
download | yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.gz yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.bz2 yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.lz yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.xz yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.zst yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/mem_map_funcs.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp index 90951812b..443d5ad7e 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp @@ -12,9 +12,9 @@ namespace Memory { -std::map<u32, MemoryBlock> g_heap_map; -std::map<u32, MemoryBlock> g_heap_gsp_map; -std::map<u32, MemoryBlock> g_shared_map; +static std::map<u32, MemoryBlock> heap_map; +static std::map<u32, MemoryBlock> heap_gsp_map; +static std::map<u32, MemoryBlock> shared_map; /// Convert a physical address to virtual address VAddr PhysicalToVirtualAddress(const PAddr addr) { @@ -194,11 +194,11 @@ u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions) { block.operation = operation; block.permissions = permissions; - if (g_heap_map.size() > 0) { - const MemoryBlock last_block = g_heap_map.rbegin()->second; + if (heap_map.size() > 0) { + const MemoryBlock last_block = heap_map.rbegin()->second; block.address = last_block.address + last_block.size; } - g_heap_map[block.GetVirtualAddress()] = block; + heap_map[block.GetVirtualAddress()] = block; return block.GetVirtualAddress(); } @@ -217,11 +217,11 @@ u32 MapBlock_HeapGSP(u32 size, u32 operation, u32 permissions) { block.operation = operation; block.permissions = permissions; - if (g_heap_gsp_map.size() > 0) { - const MemoryBlock last_block = g_heap_gsp_map.rbegin()->second; + if (heap_gsp_map.size() > 0) { + const MemoryBlock last_block = heap_gsp_map.rbegin()->second; block.address = last_block.address + last_block.size; } - g_heap_gsp_map[block.GetVirtualAddress()] = block; + heap_gsp_map[block.GetVirtualAddress()] = block; return block.GetVirtualAddress(); } |