2 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
11 #include <bits/l4-malloc.h>
15 #include "page_alloc.h"
17 #include <l4/sys/types.h>
19 #include <l4/cxx/iostream>
21 static void *current_morecore_end;
23 void *uclibc_morecore(long bytes)
25 // Calling morecore with 0 size is done by the malloc/free implementation
26 // to check for the amount of memory it got from the last call to
28 // With a negative value, 'free' wants to return memory, we do not support
31 return current_morecore_end;
33 size_t s = l4_round_page(bytes);
34 void *b = Single_page_alloc_base::_alloc(Single_page_alloc_base::nothrow,
39 current_morecore_end = static_cast<char *>(b) + s;
43 void * mmap(void * /*start*/, size_t /*length*/, int /*prot*/, int /*flags*/, int /*fd*/, off_t /*offset*/) throw()
45 L4::cout << "mmap() called: unimplemented!\n";
50 int munmap(void * /*start*/, size_t /*length*/) throw()
52 L4::cout << "munmap() called: unimplemented!\n";
57 void * mremap(void * /*old_address*/, size_t /*old_size*/, size_t /*new_size*/,
58 int /*may_move*/, ...) throw()
60 L4::cout << "mremap() called: unimplemented!\n";