You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a memory region into the memory map. There are three types of memory regions that can be added:
2237
+
- BinaryMemoryRegion(*** Unimplemented ***): Creates a memory region from a loadable binary format and provides persistence across sessions.
2238
+
- DataMemoryRegion: Creates a memory region from a flat file or bytes and provide persistence across sessions.
2239
+
- RemoteMemoryRegion: Creates a memory region from a proxy callback interface. This region is ephemeral and not saved across sessions.
2240
+
2241
+
The type of memory region added depends on the source parameter:
2242
+
- `os.PathLike`, `str`, : Treats the source as a file path which is read and loaded into memory as a DataMemoryRegion.
2243
+
- `bytes`, `bytearray`: Directly loads these byte formats into memory as a DataMemoryRegion.
2244
+
- `databuffer.DataBuffer`: Directly loads a data buffer into memory as a DataMemoryRegion.
2245
+
- `fileaccessor.FileAccessor`: Utilizes a file accessor to establish a RemoteMemoryRegion, managing data fetched from a remote source.
2246
+
2247
+
Parameters:
2248
+
name (str): A unique name of the memory region.
2249
+
start (int): The start address in memory where the region will be loaded.
2250
+
source (Union[os.PathLike, str, bytes, bytearray, BinaryView, databuffer.DataBuffer, fileaccessor.FileAccessor]): The source from which the memory is loaded.
2251
+
2252
+
Returns:
2253
+
bool: True if the memory region was successfully added, False otherwise.
2254
+
2255
+
Raises:
2256
+
NotImplementedError: If the source type is not supported.
2257
+
2258
+
Notes:
2259
+
If parts of the new memory region do not overlap with existing segments, new segments will be automatically created for each non-overlapping area, each with the SegmentFlag.SegmentReadable flag set.
0 commit comments