summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-06 06:51:46 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-16 06:03:49 +0200
commit840b85690b5de1e7ca89763ff6ca58cbe9b6d68f (patch)
treea19e41f7c9a273ce89cbd072d93a64f2df087987
parentAPT: Adjust shared font hack so it works with the new linear heap code (diff)
downloadyuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.tar
yuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.tar.gz
yuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.tar.bz2
yuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.tar.lz
yuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.tar.xz
yuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.tar.zst
yuzu-840b85690b5de1e7ca89763ff6ca58cbe9b6d68f.zip
-rw-r--r--src/core/hle/kernel/memory.cpp60
-rw-r--r--src/core/hle/kernel/memory.h17
-rw-r--r--src/core/system.cpp1
3 files changed, 0 insertions, 78 deletions
diff --git a/src/core/hle/kernel/memory.cpp b/src/core/hle/kernel/memory.cpp
index e69b121eb..e4fc5f3c4 100644
--- a/src/core/hle/kernel/memory.cpp
+++ b/src/core/hle/kernel/memory.cpp
@@ -109,59 +109,6 @@ static MemoryArea memory_areas[] = {
{TLS_AREA_VADDR, TLS_AREA_SIZE, "TLS Area"}, // TLS memory
};
-/// Represents a block of memory mapped by ControlMemory/MapMemoryBlock
-struct MemoryBlock {
- MemoryBlock() : handle(0), base_address(0), address(0), size(0), operation(0), permissions(0) {
- }
- u32 handle;
- u32 base_address;
- u32 address;
- u32 size;
- u32 operation;
- u32 permissions;
-
- const u32 GetVirtualAddress() const{
- return base_address + address;
- }
-};
-
-static std::map<u32, MemoryBlock> heap_map;
-static std::map<u32, MemoryBlock> heap_linear_map;
-
-}
-
-u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions) {
- MemoryBlock block;
-
- block.base_address = HEAP_VADDR;
- block.size = size;
- block.operation = operation;
- block.permissions = permissions;
-
- if (heap_map.size() > 0) {
- const MemoryBlock last_block = heap_map.rbegin()->second;
- block.address = last_block.address + last_block.size;
- }
- heap_map[block.GetVirtualAddress()] = block;
-
- return block.GetVirtualAddress();
-}
-
-u32 MapBlock_HeapLinear(u32 size, u32 operation, u32 permissions) {
- MemoryBlock block;
-
- block.base_address = LINEAR_HEAP_VADDR;
- block.size = size;
- block.operation = operation;
- block.permissions = permissions;
-
- if (heap_linear_map.size() > 0) {
- const MemoryBlock last_block = heap_linear_map.rbegin()->second;
- block.address = last_block.address + last_block.size;
- }
- heap_linear_map[block.GetVirtualAddress()] = block;
-
- return block.GetVirtualAddress();
}
void Init() {
@@ -186,11 +133,4 @@ void InitLegacyAddressSpace(Kernel::VMManager& address_space) {
address_space.Reprotect(shared_page_vma, VMAPermission::Read);
}
-void Shutdown() {
- heap_map.clear();
- heap_linear_map.clear();
-
- LOG_DEBUG(HW_Memory, "shutdown OK");
-}
-
} // namespace
diff --git a/src/core/hle/kernel/memory.h b/src/core/hle/kernel/memory.h
index 2e2cae17d..36690b091 100644
--- a/src/core/hle/kernel/memory.h
+++ b/src/core/hle/kernel/memory.h
@@ -31,22 +31,5 @@ namespace Memory {
void Init();
void InitLegacyAddressSpace(Kernel::VMManager& address_space);
-void Shutdown();
-
-/**
- * Maps a block of memory on the heap
- * @param size Size of block in bytes
- * @param operation Memory map operation type
- * @param permissions Memory allocation permissions
- */
-u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions);
-
-/**
- * Maps a block of memory on the GSP heap
- * @param size Size of block in bytes
- * @param operation Memory map operation type
- * @param permissions Control memory permissions
- */
-u32 MapBlock_HeapLinear(u32 size, u32 operation, u32 permissions);
} // namespace
diff --git a/src/core/system.cpp b/src/core/system.cpp
index 8d80ef372..3cd84bf5e 100644
--- a/src/core/system.cpp
+++ b/src/core/system.cpp
@@ -29,7 +29,6 @@ void Shutdown() {
HLE::Shutdown();
Kernel::Shutdown();
HW::Shutdown();
- Memory::Shutdown();
CoreTiming::Shutdown();
Core::Shutdown();
}