1 .\" Copyright (c) 2009 Alan L. Cox <alc@cs.rice.edu>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
27 .Dd September 21, 2009
32 .Nd "get system page sizes"
38 .Fn getpagesizes "size_t pagesize[]" "int nelem"
42 function retrieves page size information from the system.
43 When it is called with
49 specified as 0, it returns the number of distinct page sizes that are
50 supported by the system.
51 Otherwise, it assigns up to
53 of the system-supported page sizes to consecutive elements of the
56 These page sizes are expressed in bytes.
59 returns the number of such page sizes that it assigned to the array.
63 function returns either the number of page sizes that are supported by
64 the system or the number of supported page sizes that it assigned to
65 the array referenced by
67 Otherwise, it returns the value\~\-1 and sets
69 to indicate the error.
73 function will succeed unless:
86 argument is less than zero.
93 function first appeared in Solaris 9.
94 This manual page was written in conjunction with a new but compatible
95 implementation that was first released in
98 This manual page was written by
99 .An Alan L. Cox Aq alc@cs.rice.edu .