SplitScript reference / Process / findMemoryRange
Process.findMemoryRange
Method
Process.findMemoryRange(size: u64, access: MemoryRangeAccess) -> async MemoryRange
Searches mapped memory ranges cooperatively.
At most one host memory-range entry is inspected per update. When one complete snapshot contains no match, the operation refreshes the mapped ranges and keeps waiting. It completes only after finding the requested size and permissions; closing the attached process cancels it.
Parameters
size: The exact mapped byte length.access: Permissions that the range must provide.
Effects: allocates, reads process memory, requires an attached process, suspends, cancels when the process closes
Runtime behavior: available only in onAttach; suspends; cancels when the process closes
Examples
Find a readable and writable emulator mapping
let mapping = await process.findMemoryRange(0x48000, MemoryRangeAccess.ReadWrite)