introspection_get_pagetableinfo()

Get pagetable information within a virtual address range

Synopsis:

#include <sys/introspection.h>

int introspection_get_pagetableinfo( pid64_t pid64,
                                     uintptr_t startaddr,
                                     uintptr_t endaddr,
                                     struct _procfs_map_info *mapinfo,
                                     size_t bsize );

Arguments:

pid64
The PID (pid_t) or unique PID (pid64_t) of the target process.
startaddr
The beginning of the address range.
endaddr
The end of the address range.
mapinfo
The buffer to store the data in.
bsize
The size of the buffer.

Library:

libintrospection

Use the -l introspection option to qcc to link against this library.

Description:

The introspection_get_pagetableinfo() function provides page table details of a certain page, including its physical address, protection bits, and attributes. Unlike the introspection_get_physical_regions() and introspection_get_virtual_regions(), the introspection_get_pagetableinfo() function returns data for the specified startaddr. This function stores an array of struct _procfs_map_info in the provided buffer.

Note:
Your process must have the PROCMGR_AID_XPROCESS_QUERY ability enabled to request information about another process.

Returns:

The required size in bytes to store the pagetable information, on success. If an error occurs, the function returns the negative of a value from the Errors section.

Errors:

EFAULT
Error accessing the output buffer.
EPERM
The calling process doesn't have the required ability.
ESRCH
The PID is invalid.

Classification:

QNX OS

Safety:
Cancellation point Yes
Signal handler Yes
Thread Yes
Page updated: