summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/vm_manager.h
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2019-07-04 21:32:32 +0200
committerGitHub <noreply@github.com>2019-07-04 21:32:32 +0200
commit54a02d14fd38282e446a56892a1c45f558ee0e42 (patch)
tree79a86a51973712ee8307071a6c5dc471289746eb /src/core/hle/kernel/vm_manager.h
parentMerge pull request #2670 from DarkLordZach/fix-merge-discrep-1 (diff)
parentkernel/process: Default initialize all member variables (diff)
downloadyuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.tar
yuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.tar.gz
yuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.tar.bz2
yuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.tar.lz
yuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.tar.xz
yuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.tar.zst
yuzu-54a02d14fd38282e446a56892a1c45f558ee0e42.zip
Diffstat (limited to 'src/core/hle/kernel/vm_manager.h')
-rw-r--r--src/core/hle/kernel/vm_manager.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index dfbf7a894..752ae62f9 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -362,14 +362,39 @@ public:
ResultVal<VMAHandle> MapBackingMemory(VAddr target, u8* memory, u64 size, MemoryState state);
/**
- * Finds the first free address that can hold a region of the desired size.
+ * Finds the first free memory region of the given size within
+ * the user-addressable ASLR memory region.
*
- * @param size Size of the desired region.
- * @return The found free address.
+ * @param size The size of the desired region in bytes.
+ *
+ * @returns If successful, the base address of the free region with
+ * the given size.
*/
ResultVal<VAddr> FindFreeRegion(u64 size) const;
/**
+ * Finds the first free address range that can hold a region of the desired size
+ *
+ * @param begin The starting address of the range.
+ * This is treated as an inclusive beginning address.
+ *
+ * @param end The ending address of the range.
+ * This is treated as an exclusive ending address.
+ *
+ * @param size The size of the free region to attempt to locate,
+ * in bytes.
+ *
+ * @returns If successful, the base address of the free region with
+ * the given size.
+ *
+ * @returns If unsuccessful, a result containing an error code.
+ *
+ * @pre The starting address must be less than the ending address.
+ * @pre The size must not exceed the address range itself.
+ */
+ ResultVal<VAddr> FindFreeRegion(VAddr begin, VAddr end, u64 size) const;
+
+ /**
* Maps a memory-mapped IO region at a given address.
*
* @param target The guest address to start the mapping at.