diff options
| author | 2014-11-18 08:48:11 -0500 | |
|---|---|---|
| committer | 2014-11-18 20:04:00 -0500 | |
| commit | 7cbecde2ca1b0ea3faf4caf384b6512cb9849162 (patch) | |
| tree | 9ab722431792e984297aa71a10a0359e9aab80e4 /src/core/mem_map_funcs.cpp | |
| parent | Merge pull request #200 from lioncash/statics (diff) | |
| download | yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.gz yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.tar.xz yuzu-7cbecde2ca1b0ea3faf4caf384b6512cb9849162.zip | |
Add static to some variables
Diffstat (limited to 'src/core/mem_map_funcs.cpp')
| -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 @@ | |||
| 12 | 12 | ||
| 13 | namespace Memory { | 13 | namespace Memory { |
| 14 | 14 | ||
| 15 | std::map<u32, MemoryBlock> g_heap_map; | 15 | static std::map<u32, MemoryBlock> heap_map; |
| 16 | std::map<u32, MemoryBlock> g_heap_gsp_map; | 16 | static std::map<u32, MemoryBlock> heap_gsp_map; |
| 17 | std::map<u32, MemoryBlock> g_shared_map; | 17 | static std::map<u32, MemoryBlock> shared_map; |
| 18 | 18 | ||
| 19 | /// Convert a physical address to virtual address | 19 | /// Convert a physical address to virtual address |
| 20 | VAddr PhysicalToVirtualAddress(const PAddr addr) { | 20 | VAddr PhysicalToVirtualAddress(const PAddr addr) { |
| @@ -194,11 +194,11 @@ u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions) { | |||
| 194 | block.operation = operation; | 194 | block.operation = operation; |
| 195 | block.permissions = permissions; | 195 | block.permissions = permissions; |
| 196 | 196 | ||
| 197 | if (g_heap_map.size() > 0) { | 197 | if (heap_map.size() > 0) { |
| 198 | const MemoryBlock last_block = g_heap_map.rbegin()->second; | 198 | const MemoryBlock last_block = heap_map.rbegin()->second; |
| 199 | block.address = last_block.address + last_block.size; | 199 | block.address = last_block.address + last_block.size; |
| 200 | } | 200 | } |
| 201 | g_heap_map[block.GetVirtualAddress()] = block; | 201 | heap_map[block.GetVirtualAddress()] = block; |
| 202 | 202 | ||
| 203 | return block.GetVirtualAddress(); | 203 | return block.GetVirtualAddress(); |
| 204 | } | 204 | } |
| @@ -217,11 +217,11 @@ u32 MapBlock_HeapGSP(u32 size, u32 operation, u32 permissions) { | |||
| 217 | block.operation = operation; | 217 | block.operation = operation; |
| 218 | block.permissions = permissions; | 218 | block.permissions = permissions; |
| 219 | 219 | ||
| 220 | if (g_heap_gsp_map.size() > 0) { | 220 | if (heap_gsp_map.size() > 0) { |
| 221 | const MemoryBlock last_block = g_heap_gsp_map.rbegin()->second; | 221 | const MemoryBlock last_block = heap_gsp_map.rbegin()->second; |
| 222 | block.address = last_block.address + last_block.size; | 222 | block.address = last_block.address + last_block.size; |
| 223 | } | 223 | } |
| 224 | g_heap_gsp_map[block.GetVirtualAddress()] = block; | 224 | heap_gsp_map[block.GetVirtualAddress()] = block; |
| 225 | 225 | ||
| 226 | return block.GetVirtualAddress(); | 226 | return block.GetVirtualAddress(); |
| 227 | } | 227 | } |