Functions



getAddressTask

Abstract: Accessor to the task of the mapping.
public:

virtual task_t getAddressTask() = 0;

This method returns the mach task the mapping exists in.

Result: A mach task_t.

getLength

Abstract: Accessor to the length of the mapping.
public:

virtual IOByteCount getLength() = 0;

This method returns the length of the mapping.

Result: A byte count.

getMapOptions

Abstract: Accessor to the options the mapping was created with.
public:

virtual IOOptionBits getMapOptions() = 0;

This method returns the options to IOMemoryDescriptor::map the mapping was created with.

Result: Options for the mapping, including cache settings.

getMemoryDescriptor

Abstract: Accessor to the IOMemoryDescriptor the mapping was created from.
public:

virtual IOMemoryDescriptor * getMemoryDescriptor() = 0;

This method returns the IOMemoryDescriptor the mapping was created from.

Result: An IOMemoryDescriptor reference, which is valid while the IOMemoryMap object is retained. It should not be released by the caller.

getPhysicalAddress

Abstract: Return the physical address of the first byte in the mapping.
public:

inline IOPhysicalAddress getPhysicalAddress() { return( getPhysicalSegment( 0, 0 )); }

This method returns the physical address of the first byte in the mapping. It is most useful on mappings known to be physically contiguous.

Result: A physical address.

getPhysicalSegment

Abstract: Break a mapping into its physically contiguous segments.
public:

virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset, IOByteCount * length) = 0;

This method returns the physical address of the byte at the given offset into the mapping, and optionally the length of the physically contiguous segment from that offset. It functions similarly to IOMemoryDescriptor::getPhysicalSegment.

Parameters

NameDescription
offsetA byte offset into the mapping whose physical address to return.
lengthIf non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset.
Result: A physical address, or zero if the offset is beyond the length of the mapping.

getVirtualAddress

Abstract: Accessor to the virtual address of the first byte in the mapping.
public:

virtual IOVirtualAddress getVirtualAddress() = 0;

This method returns the virtual address of the first byte in the mapping.

Result: A virtual address.

unmap

Abstract: Force the IOMemoryMap to unmap, without destroying the object.
public:

virtual IOReturn unmap() = 0;

IOMemoryMap instances will unmap themselves upon free, ie. when the last client with a reference calls release. This method forces the IOMemoryMap to destroy the mapping it represents, regardless of the number of clients. It is not generally used.

Result: An IOReturn code.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)