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.
10 #ifndef SIGMA0_MEM_MAN_H__
11 #define SIGMA0_MEM_MAN_H__
13 #include <l4/cxx/avl_set>
15 #include "page_alloc.h"
22 bool alloc_from(Region const *r2, Region const &r);
27 typedef cxx::Avl_set< Region, cxx::Lt_functor<Region>, Slab_alloc> Tree;
33 static Mem_man *ram() { return &_ram; }
35 unsigned long alloc(Region const &r, bool force = false);
36 bool reserve(Region const &r);
37 bool add_free(Region const &r);
38 bool add(Region const &r);
39 Region const *find(Region const &r, bool force = false) const;
42 unsigned long alloc_first(unsigned long size, unsigned owner = 2);