Kernel/VMManager: Added a function to map a block of memory into the first available address after a given base.

This commit is contained in:
Subv
2018-01-23 08:24:15 -05:00
parent 44d07574b1
commit 928202f744
2 changed files with 39 additions and 0 deletions
+12
View File
@@ -144,6 +144,18 @@ public:
ResultVal<VMAHandle> MapMemoryBlock(VAddr target, std::shared_ptr<std::vector<u8>> block,
size_t offset, u32 size, MemoryState state);
/**
* Maps part of a ref-counted block of memory at the first free address after the given base.
*
* @param base The base address to start the mapping at.
* @param block The block to be mapped.
* @param offset Offset into `block` to map from.
* @param size Size of the mapping.
* @param state MemoryState tag to attach to the VMA.
* @returns The address at which the memory was mapped.
*/
ResultVal<VAddr> MapMemoryBlockToBase(VAddr base, std::shared_ptr<std::vector<u8>> block,
size_t offset, u32 size, MemoryState state);
/**
* Maps an unmanaged host memory pointer at a given address.
*