! Fixed the root Makefile
[lightOS.git] / kernel / libc / allocpages.cpp
blob80e933876d011616233680dfda6ea59c65c56098
1 /*
2 lightOS kernel
3 Copyright (C) 2006-2009 Jörg Pfähler
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <kernel/context.hpp>
20 #include <kernel/page_allocator.hpp>
21 using namespace std;
22 using namespace kernel;
24 extern "C" void *_LIBOS_allocPage(size_t n);
26 void *_LIBOS_allocPage(size_t n)
28 kernel_context &KernelContext = kernel_context::instance();
30 return KernelContext.heap_map( n,
31 lightOS::context::write | lightOS::context::global,
32 0);