summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-11-19 14:29:25 +0100
committerLioncash <mathew1800@gmail.com>2018-11-19 15:20:25 +0100
commitf4722327059b3a618ea63539a31c4f5a16e14bd4 (patch)
tree7a9fe4439de56a80c8fbc5a51f5a31199d92a1c6 /src/core/hle
parentMerge pull request #1717 from FreddyFunk/swizzle-gob (diff)
downloadyuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.tar
yuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.tar.gz
yuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.tar.bz2
yuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.tar.lz
yuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.tar.xz
yuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.tar.zst
yuzu-f4722327059b3a618ea63539a31c4f5a16e14bd4.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/shared_memory.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h
index 2c06bb7ce..9a7c189e8 100644
--- a/src/core/hle/kernel/shared_memory.h
+++ b/src/core/hle/kernel/shared_memory.h
@@ -81,6 +81,11 @@ public:
return HANDLE_TYPE;
}
+ /// Gets the size of the underlying memory block in bytes.
+ u64 GetSize() const {
+ return size;
+ }
+
/**
* Converts the specified MemoryPermission into the equivalent VMAPermission.
* @param permission The MemoryPermission to convert.
@@ -112,26 +117,26 @@ public:
*/
u8* GetPointer(u32 offset = 0);
- /// Process that created this shared memory block.
- SharedPtr<Process> owner_process;
- /// Address of shared memory block in the owner process if specified.
- VAddr base_address;
+private:
+ explicit SharedMemory(KernelCore& kernel);
+ ~SharedMemory() override;
+
/// Backing memory for this shared memory block.
std::shared_ptr<std::vector<u8>> backing_block;
/// Offset into the backing block for this shared memory.
- std::size_t backing_block_offset;
+ std::size_t backing_block_offset = 0;
/// Size of the memory block. Page-aligned.
- u64 size;
+ u64 size = 0;
/// Permission restrictions applied to the process which created the block.
- MemoryPermission permissions;
+ MemoryPermission permissions{};
/// Permission restrictions applied to other processes mapping the block.
- MemoryPermission other_permissions;
+ MemoryPermission other_permissions{};
+ /// Process that created this shared memory block.
+ SharedPtr<Process> owner_process;
+ /// Address of shared memory block in the owner process if specified.
+ VAddr base_address = 0;
/// Name of shared memory object.
std::string name;
-
-private:
- explicit SharedMemory(KernelCore& kernel);
- ~SharedMemory() override;
};
} // namespace Kernel