diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-07-18 18:15:53 -0400 |
|---|---|---|
| committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-19 10:06:08 -0400 |
| commit | 9bede4eeed523f9707a989f1297279c006086e76 (patch) | |
| tree | 2acfabeff5f7f449bcdb22563f5ad66f7fa5f414 /src/core/hle/kernel/shared_memory.cpp | |
| parent | 5d369112d9d467d4257e24ce57f3ebba824556f0 (diff) | |
VM_Manager: Align allocated memory to 256bytes
This commit ensures that all backing memory allocated for the Guest CPU
is aligned to 256 bytes. This due to how gpu memory works and the heavy
constraints it has in the alignment of physical memory.
Diffstat (limited to 'src/core/hle/kernel/shared_memory.cpp')
| -rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index f15c5ee36..45a9e1942 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -28,7 +28,7 @@ SharedPtr<SharedMemory> SharedMemory::Create(KernelCore& kernel, Process* owner_ shared_memory->other_permissions = other_permissions; if (address == 0) { - shared_memory->backing_block = std::make_shared<std::vector<u8>>(size); + shared_memory->backing_block = std::make_shared<Kernel::PhysicalMemory>(size); shared_memory->backing_block_offset = 0; // Refresh the address mappings for the current process. @@ -59,7 +59,7 @@ SharedPtr<SharedMemory> SharedMemory::Create(KernelCore& kernel, Process* owner_ } SharedPtr<SharedMemory> SharedMemory::CreateForApplet( - KernelCore& kernel, std::shared_ptr<std::vector<u8>> heap_block, std::size_t offset, u64 size, + KernelCore& kernel, std::shared_ptr<Kernel::PhysicalMemory> heap_block, std::size_t offset, u64 size, MemoryPermission permissions, MemoryPermission other_permissions, std::string name) { SharedPtr<SharedMemory> shared_memory(new SharedMemory(kernel)); |
