02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * CDDL HEADER START
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * The contents of this file are subject to the terms of the
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * Common Development and Distribution License (the "License").
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * You may not use this file except in compliance with the License.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * See the License for the specific language governing permissions
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * and limitations under the License.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * When distributing Covered Code, include this CDDL HEADER in each
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * If applicable, add the following below this CDDL HEADER, with the
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * fields enclosed by brackets "[]" replaced with your own identifying
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * information: Portions Copyright [yyyy] [name of copyright owner]
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * CDDL HEADER END
7257d1b4d25bfac0c802847390e98a464fd787acraf * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * Use is subject to license terms.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow#pragma ident "%Z%%M% %I% %E% SMI"
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * mman.h contains "#pragma redefine_extname getpagesizes getpagesizes2".
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * Applications that are still calling getpagesizes() instead of
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * getpagesizes2() are 'legacy' applications that have not been recompiled
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * since the #pragma redefine_extname change.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * Depending on the platform, 'legacy' applications may not be given the full
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * set of supported page sizes to prevent them from inadvertantly using 'new'
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * large pagesizes that might cause application failure or low system memory
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * conditions.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * The first parameter to the SYS_getpagesizes syscall is effectively
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow * a 'legacy' boolean flag used as such in the kernel.
02bc52be7430b2f7fafe1a2c981bff49ef11d6fakchow return (syscall(SYS_getpagesizes, 1, pagesize, nelem));