![]() |
GetPhysical |
||||
Header: | MacMemory.h | Carbon status: | Unsupported | |
Translates logical addresses into their corresponding physical addresses.
OSErr GetPhysical ( LogicalToPhysicalTable *addresses, UInt32 *physicalEntryCount );
A pointer to a structure of type LogicalToPhysicalTable. Before calling GetPhysical, set the logical field of this structure to specify the block of memory to translate. On return, the physical field of this structure holds the corresponding physical address blocks.
A pointer to the number of physical entries to translate. If you pass Null, then on return this parameter points to the number of table entries needed to translate the entire logical address range. In this case, the translation table specified by the addresses parameter does not change. If you point to a value greater than 0 in this parameter, on return the physical field of the LogicalToPhysicalTable structure contains an array specifying the physical blocks that correspond to the logical address specified in the logical field. Also, on return, this parameter contains the number of entries in that array (which may be fewer than you asked for). If the physical field of the LogicalToPhysicalTable structure was not large enough to contain all the physical blocks corresponding to the logical block, GetPhysical updates the information in the logical field of this structure to reflect the remaining number of bytes in the logical range left to translate (that is, the count field of the associated Memory Block structure) and the next address in the logical address range to translate (that is, the start field of the associated Memory Block structure).
A result code. A result code.
The logical address range must be locked to ensure validity of the translation data.
The GetPhysical function as currently implemented under virtual memory supports only logical RAM. You cannot use GetPhysical to translate addresses in the address spaces of the ROM, I/O devices, or NuBus slots. Some Macintosh computers map a portion of the physical RAM into NuBus space, to simulate the presence of a video expansion card. GetPhysical returns the result code paramErr if you attempt to read that memory.
Not supported in Carbon. Not available in Carbon.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)