withAddressRange
Creates an IOMemoryDescriptor to describe one virtual range of the specified map.
Declaration
static IOMemoryDescriptor * withAddressRange(
mach_vm_address_taddress,
mach_vm_size_twithLength,
IOOptionBitsoptions,
task_ttask);Parameters
- address:
The virtual address of the first byte in the memory.
- withLength:
The length of memory.
- options:
kIOMemoryDirectionMask (options:direction) This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
- task:
The task the virtual ranges are mapped into. Note that unlike IOMemoryDescriptor::withAddress(), kernel_task memory must be explicitly prepared when passed to this api. The task argument may be NULL to specify memory by physical address.
Return Value
The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure.
Overview
This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the specified map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described.