PageInfo

Gets allowed sizes of virtual memory pages

Linux

Uses directory names in /sys/kernel/mm/hugepages/ to get hugepage sizes and
sysconf(_SC_PAGE_SIZE) to get default page size.

Solaris

Uses getpagesizes() and getpagesize() libc calls.

Windows

Uses GetSystemInfo() to get default pagesize and GetLargePageMinimum()
to get one huge page size. No TLB information is provided.

Constants

HI_PIF_TLBINFO, HI_PIF_DEFAULT, HI_PIF_PAGEINFO, HI_PIF_HUGEPAGE


Page information flags that are saved into pi_flags field.

VALUES

#define HI_PIF_PAGEINFO 0x01
#define HI_PIF_TLBINFO  0x02
#define HI_PIF_DEFAULT  0x04
#define HI_PIF_HUGEPAGE 0x08

Functions

hi_get_pageinfo

publicplat


Get information on supported page sizes by platform
Returns array of hi_page_info_t structures

Availabilty of most information is platform-dependent, but
this function guarantee to provide correct pagesize for HI_PIF_DEFAULT pageinfo

TLB information is not provided, but it may be provided by CPUInfo

Returned array is statically allocated, no need to dispose it.

LIBEXPORT PLATAPI hi_page_info_t* hi_get_pageinfo(void)

Types

typedef struct hi_page_info


Information about page supported by processor

MEMBERS

typedef struct hi_page_info {
    int    pi_flags;
    size_t pi_size;
    int    pi_itlb_entries;
    int    pi_dtlb_entries;
} hi_page_info_t;