1 /*
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)
5  *
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.
9  */
10 
11 #include <l4/cxx/iostream>
12 #include "mem_man.h"
13 #include "mem_man_test.h"
14 
15 #define ADD(a, b) \
16   L4::cout << "add_free("#a","#b")\n"; \
17   m.add_free(Region(a, b))
18 
mem_man_test()19 void mem_man_test()
20 {
21   Mem_man m;
22   L4::cout << "mem_man_test: ....\n";
23   m.dump();
24   ADD(0x0,      0x9000);
25   ADD(0x15000, 0x20000);
26   ADD(0x25000, 0x30000);
27   ADD(0x35000, 0x40000);
28   ADD(0x45000, 0x50000);
29   m.dump();
30   ADD(0x10000, 0x11000);
31   m.dump();
32   ADD(0x14000, 0x14000);
33   m.dump();
34   ADD(0x12000, 0x13000);
35   m.dump();
36   ADD(0x24000, 0x31000);
37   m.dump();
38   ADD(0x21000, 0x25000);
39   m.dump();
40   ADD(0x8000,  0x37000);
41   m.dump();
42   ADD(0x0,     0x44000);
43   m.dump();
44   L4::cout << "mem_man_test: done\n";
45 }
46