OSStatus GetPageInformation(
AddressSpaceID theAddressSpace,
LogicalAddress theBase,
ByteCount theLength,
PBVersion theVersion,
PageInformation *thePageInfo);
struct PageInformation
{
AreaID area;
ItemCount count;
PageStateInformation information [1];
};
typedef unsigned long PageStateInformation;
enum {
kPageIsProtected = 0x00000001,
kPageIsProtectedPrivileged = 0x00000002,
kPageIsModified = 0x00000004,
kPageIsReferenced = 0x00000008,
kPageIsLocked = 0x00000010,
kPageIsResident = 0x00000020,
kPageIsShared = 0x00000040,
kPageIsWriteThroughCached = 0x00000080,
kPageIsCopyBackCached = 0x00000100
};
typedef struct PageInformation PageInformation,
*PageInformationPtr;
The GetPageInformation function returns information about each logical page in a specified range. Parameter theAddressSpace specifies the address space containing the range of interest. Parameter theBase is the first logical address of interest. Parameter theLength specifies the number of bytes of logical address space, starting at theBase, about which information is to be returned.
Parameter theVersion specifies the version number of the PageInformation type to be returned, thereby providing backward compatibility.
Parameter thePageInfo is filled in with information about each logical page. This buffer must be large enough to contain information about the entire range. The page information fields are the following:
The bits of PageStateInformation are the following:
GetPageInformation may be called only from task level, not from secondary or hardware interrupt level.