9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / getpagesizes.3c
blob395c26d44df46d527e9711f6c095aa89e2532e1e
1 '\" te
2 .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETPAGESIZES 3C "May 14, 2001"
7 .SH NAME
8 getpagesizes \- get system supported page sizes
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/mman.h>
14 \fBint\fR \fBgetpagesizes\fR(\fBsize_t\fR \fIpagesize\fR[\|], \fBint\fR \fInelem\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBgetpagesizes()\fR function returns either the number of different page
21 sizes supported by the system or the actual sizes themselves.  When called with
22 \fInelem\fR as 0 and pagesize as \fINULL\fR, \fBgetpagesizes()\fR returns the
23 number of supported page sizes. Otherwise, up to \fInelem\fR page sizes are
24 retrieved and assigned to successive elements  of \fIpagesize\fR[\|].  The
25 return value is the number of page sizes retrieved and set in
26 \fIpagesize\fR[\|].
27 .SH RETURN VALUES
28 .sp
29 .LP
30 Upon successful completion, the number of pagesizes supported or actually
31 retrieved is returned. Otherwise, \(mi1 is returned and \fBerrno\fR is set to
32 indicate the error.
33 .SH ERRORS
34 .sp
35 .LP
36 The \fBgetpagesizes()\fR function will fail if:
37 .sp
38 .ne 2
39 .na
40 \fB\fBEINVAL\fR\fR
41 .ad
42 .RS 10n
43 The \fInelem\fR argument is less than 0 or \fIpagesize\fR is \fINULL\fR but
44 \fInelem\fR is non-zero.
45 .RE
47 .SH USAGE
48 .sp
49 .LP
50 The \fBgetpagesizes()\fR function returns all the page sizes for which the
51 hardware and system software provide support for the \fBmemcntl\fR(2) command
52 \fBMC_HAT_ADVISE\fR. Not all processors support all page sizes or combinations
53 of page sizes with equal efficiency. Applications programmers should take this
54 into consideration when using \fBgetpagesizes()\fR.
55 .SH ATTRIBUTES
56 .sp
57 .LP
58 See \fBattributes\fR(5) for descriptions of the following attributes:
59 .sp
61 .sp
62 .TS
63 box;
64 c | c
65 l | l .
66 ATTRIBUTE TYPE  ATTRIBUTE VALUE
68 MT-Level        MT-Safe
69 .TE
71 .SH SEE ALSO
72 .sp
73 .LP
74 \fBmemcntl\fR(2), \fBmmap\fR(2), \fBgetpagesize\fR(3C), \fBattributes\fR(5)