perfstat_memory_page Subroutine

Purpose

Retrieves use statistics for multiple page size

Library

Perfstat Library (libperfstat.a)

Syntax

#include <libperfstat.h>

int perfstat_memory_page ( psize, userbuff, sizeof_userbuff, desired_number )
perfstat_psize_t *psize;
perfstat_memory_total_wpar_t *userbuff;
size_t sizeof_userbuff;
int desired_number;

Description

The perfstat_memory_page subroutine returns the statistics corresponding to the different page sizes.

To get the number of supported page sizes, the psize parameter and the userbuff parameter must be specified as NULL, and the value of the desired_number parameter must be set to zero.

To get the statistics for the supported page sizes, specify the page size in the psize parameter. The desired_number parameter specifies the number of different page size statistics to be collected. The userbuff parameter must be allocated.

Parameters

Item Description
psize Specifies the page size for which the statistics are to be collected.
userbuff Points to the memory area that is to be filled with the perfstat_memory_page_t structure.
sizeof_userbuff Specifies the size of the perfstat_memory_page_t structure.
desired_number Specifies the number of different page size statistics to be collected.

Return Values

Upon successful completion, the number of structures filled is returned. The returned value is one.

If unsuccessful, a value of -1 is returned, and the errno global variable is set.

Error Codes

The perfstat_memory_page subroutine is unsuccessful if the following is true:

Item Description
EINVAL One of the parameters is not valid

Files

The libperfstat.h file defines standard macros, data types, and subroutines.