From 74d4bc0af1d2f22105bf3c00efcb85613d59cc19 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Wed, 5 Aug 2015 21:26:52 -0300 Subject: Kernel: Add more infrastructure to support different memory layouts This adds some structures necessary to support multiple memory regions in the future. It also adds support for different system memory types and the new linear heap mapping at 0x30000000. --- src/core/hle/kernel/process.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/hle/kernel/process.h') diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 5c7de9044..7c3a78b9e 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -49,6 +49,7 @@ union ProcessFlags { }; class ResourceLimit; +struct MemoryRegionInfo; struct CodeSet final : public Object { static SharedPtr Create(std::string name, u64 program_id); @@ -135,11 +136,14 @@ public: // The left/right bounds of the address space covered by heap_memory. VAddr heap_start = 0, heap_end = 0; - std::shared_ptr> linear_heap_memory; + MemoryRegionInfo* memory_region = nullptr; /// Bitmask of the used TLS slots std::bitset<300> used_tls_slots; + VAddr GetLinearHeapBase() const; + VAddr GetLinearHeapLimit() const; + ResultVal HeapAllocate(VAddr target, u32 size, VMAPermission perms); ResultCode HeapFree(VAddr target, u32 size); -- cgit v1.2.3