1 /* Allocate memory on a page boundary.
2 Copyright (C) 1991, 1992 Free Software Foundation, Inc.
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with this library; see the file COPYING.LIB. If
16 not, see <http://www.gnu.org/licenses/>.
18 The author may be reached (Email) at the address mike@@ai.mit.edu,
19 or (US mail) as Mike Haertel c/o Free Software Foundation. */
26 static size_t pagesize
;
28 __ptr_t
valloc (size_t size
)
31 pagesize
= getpagesize ();
33 return memalign(pagesize
, size
);