xmempsize Kernel Service

Purpose

Reports the page size being used for a specified address range on the 64-bit kernel.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/xmem.h>

long long xmempsize (dp, uaddr, count)

struct xmem * dp; 
void * uaddr; 
size_t count; 

Description

The xmempsize kernel service returns the size, in bytes, of the virtual memory pages contained in the memory range starting at uaddr and continuing for count number of bytes. If the memory range consists of virtual memory pages of different sizes, the size of the smallest pages contained in the range is returned.

The cross-memory descriptor, dp, must have been previously initialized to describe the buffer containing the specified range of memory. The xmattach() kernel service prepares a buffer and cross-memory descriptor for use with the xmempsize() kernel service.

Parameters

Item Description
dp Specifies the cross-memory descriptor.
uaddr Specifies the starting address of the memory range.
count Specifies the number of bytes.

Execution Environment

The xmempsize kernel service can be called from either the process or interrupt environment.

The xmempsize kernel service is only supported on the 64-bit kernel.

Return Values

On successful completion, the xmempsize() kernel service returns a page size in bytes.

Otherwise, the xmempsize() kernel service returns XMEM_FAIL.