Added getIntersectingMemorySegmentDescriptors() member function to address space descriptor struct

This commit is contained in:
Nav
2024-03-17 13:12:10 +00:00
parent 6ca2f7681b
commit b94d76cb45
2 changed files with 29 additions and 0 deletions

View File

@@ -56,6 +56,19 @@ namespace Targets
*/
const TargetMemorySegmentDescriptor& getMemorySegmentDescriptor(const std::string& key) const;
/**
* Fetches all memory segments in the address space that intersect with the given address range.
*
* @param addressRange
* The address range with which the memory segments must intersect.
*
* @return
* Pointers to descriptors of all intersecting memory segments.
*/
std::vector<const TargetMemorySegmentDescriptor*> getIntersectingMemorySegmentDescriptors(
const TargetMemoryAddressRange& addressRange
) const;
private:
static inline std::atomic<TargetAddressSpaceDescriptorId> lastAddressSpaceDescriptorId = 0;
};