]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/gen/getpagesizes.3
Fix "version introduced" in numerous manual pages
[FreeBSD/FreeBSD.git] / lib / libc / gen / getpagesizes.3
1 .\" Copyright (c) 2009 Alan L. Cox <alc@cs.rice.edu>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .Dd September 21, 2009
26 .Dt GETPAGESIZES 3
27 .Os
28 .Sh NAME
29 .Nm getpagesizes
30 .Nd "get system page sizes"
31 .Sh LIBRARY
32 .Lb libc
33 .Sh SYNOPSIS
34 .In sys/mman.h
35 .Ft int
36 .Fn getpagesizes "size_t pagesize[]" "int nelem"
37 .Sh DESCRIPTION
38 The
39 .Fn getpagesizes
40 function retrieves page size information from the system.
41 When it is called with
42 .Fa pagesize
43 specified as
44 .Dv NULL
45 and
46 .Fa nelem
47 specified as 0, it returns the number of distinct page sizes that are
48 supported by the system.
49 Otherwise, it assigns up to
50 .Fa nelem
51 of the system-supported page sizes to consecutive elements of the
52 array referenced by
53 .Fa pagesize .
54 These page sizes are expressed in bytes.
55 In this case,
56 .Fn getpagesizes
57 returns the number of such page sizes that it assigned to the array.
58 .Sh RETURN VALUES
59 If successful, the
60 .Fn getpagesizes
61 function returns either the number of page sizes that are supported by
62 the system or the number of supported page sizes that it assigned to
63 the array referenced by
64 .Fa pagesize .
65 Otherwise, it returns the value\~\-1 and sets
66 .Va errno
67 to indicate the error.
68 .Sh ERRORS
69 The
70 .Fn getpagesizes
71 function will succeed unless:
72 .Bl -tag -width Er
73 .It Bq Er EINVAL
74 The
75 .Fa pagesize
76 argument is
77 .Dv NULL
78 and the
79 .Fa nelem
80 argument is non-zero.
81 .It Bq Er EINVAL
82 The
83 .Fa nelem
84 argument is less than zero.
85 .El
86 .Sh SEE ALSO
87 .Xr getpagesize 3
88 .Sh HISTORY
89 The
90 .Fn getpagesizes
91 function first appeared in Solaris 9.
92 This manual page was written in conjunction with a new but compatible
93 implementation that was first released in
94 .Fx 7.3 .
95 .Sh AUTHORS
96 This manual page was written by
97 .An Alan L. Cox Aq Mt alc@cs.rice.edu .