summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/vm_manager.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-05 20:20:13 +0200
committerLioncash <mathew1800@gmail.com>2019-07-04 02:29:49 +0200
commit55481df50f98feb04b18beb518904681b8fcc345 (patch)
tree204f9e55abae9b53e4ba78ad0a7a3251b828734b /src/core/hle/kernel/vm_manager.h
parentMerge pull request #2613 from ogniK5377/InitalizeApplicationInfo (diff)
downloadyuzu-55481df50f98feb04b18beb518904681b8fcc345.tar
yuzu-55481df50f98feb04b18beb518904681b8fcc345.tar.gz
yuzu-55481df50f98feb04b18beb518904681b8fcc345.tar.bz2
yuzu-55481df50f98feb04b18beb518904681b8fcc345.tar.lz
yuzu-55481df50f98feb04b18beb518904681b8fcc345.tar.xz
yuzu-55481df50f98feb04b18beb518904681b8fcc345.tar.zst
yuzu-55481df50f98feb04b18beb518904681b8fcc345.zip
Diffstat (limited to '')
-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.