]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/moe/server/src/dataspace_static.cc
update
[l4.git] / l4 / pkg / moe / server / src / dataspace_static.cc
1 /*
2  * (c) 2008-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  *
5  * This file is part of TUD:OS and distributed under the terms of the
6  * GNU General Public License 2.
7  * Please see the COPYING-GPL-2 file for details.
8  */
9 #include "dataspace_static.h"
10 #include "dataspace.h"
11 #include "slab_alloc.h"
12
13 #include <l4/cxx/exceptions>
14
15 static Slab_alloc<Moe::Dataspace_static> *alloc()
16 {
17   static Slab_alloc<Moe::Dataspace_static> a;
18   return &a;
19 }
20
21 void *Moe::Dataspace_static::operator new (size_t)
22 {
23   return alloc()->alloc();
24 }
25
26 void Moe::Dataspace_static::operator delete (void *m) throw()
27 { alloc()->free((Moe::Dataspace_static*)m); }
28