14N/A * The contents of this file are subject to the terms of the 14N/A * Common Development and Distribution License (the "License"). 14N/A * You may not use this file except in compliance with the License. 14N/A * See the License for the specific language governing permissions 14N/A * and limitations under the License. 14N/A * When distributing Covered Code, include this CDDL HEADER in each 14N/A * If applicable, add the following below this CDDL HEADER, with the 14N/A * fields enclosed by brackets "[]" replaced with your own identifying 14N/A * information: Portions Copyright [yyyy] [name of copyright owner] 14N/A * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * Use is subject to license terms. 14N/A /* determine available page sizes before parsing options */ 14N/A /* pick a default for mapping length and page size */ 14N/A /* set mapping length so we map at least 2 pages */ 0N/A " [-f file-to-map (default %s)]\n" 14N/A " [-l mapping-length (default %lld)]\n" 14N/A " [-p page-size (default %lld)]\n" 0N/A " [-r] (read a byte from each page)\n" 0N/A " [-w] (write a byte on each page)\n" 0N/A " [-s] (use MAP_SHARED)\n" 0N/A "notes: measures mmap()\n",
14N/A * If optp or optl were set by caller, make sure that they point to a 14N/A * valid pagesize. If not, return an error. 14N/A * If the benchmark is running 32-bit, return an error if a page 14N/A * size >= 1G is selected. 14N/A printf(
"Page sizes >= 1G not supported on 32-bit\n");
14N/A printf(
"map length %lld must be aligned to page size %lld\n",