1getpagesizes(3C) Standard C Library Functions getpagesizes(3C)
2
3
4
6 getpagesizes - get system supported page sizes
7
9 #include <sys/mman.h>
10
11 int getpagesizes(size_t pagesize[], int nelem);
12
13
15 The getpagesizes() function returns either the number of different page
16 sizes supported by the system or the actual sizes themselves. When
17 called with nelem as 0 and pagesize as NULL, getpagesizes() returns the
18 number of supported page sizes. Otherwise, up to nelem page sizes are
19 retrieved and assigned to successive elements of pagesize[]. The
20 return value is the number of page sizes retrieved and set in page‐
21 size[].
22
24 Upon successful completion, the number of pagesizes supported or actu‐
25 ally retrieved is returned. Otherwise, −1 is returned and errno is set
26 to indicate the error.
27
29 The getpagesizes() function will fail if:
30
31 EINVAL The nelem argument is less than 0 or pagesize is NULL but
32 nelem is non-zero.
33
34
36 The getpagesizes() function returns all the page sizes for which the
37 hardware and system software provide support for the memcntl(2) command
38 MC_HAT_ADVISE. Not all processors support all page sizes or combina‐
39 tions of page sizes with equal efficiency. Applications programmers
40 should take this into consideration when using getpagesizes().
41
43 See attributes(5) for descriptions of the following attributes:
44
45
46
47
48 ┌─────────────────────────────┬─────────────────────────────┐
49 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
50 ├─────────────────────────────┼─────────────────────────────┤
51 │MT-Level │MT-Safe │
52 └─────────────────────────────┴─────────────────────────────┘
53
55 memcntl(2), mmap(2), getpagesize(3C), attributes(5)
56
57
58
59SunOS 5.11 14 May 2001 getpagesizes(3C)