]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/arm/vm_factory-arm.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / vm_factory-arm.cpp
1 IMPLEMENTATION [arm && arm_em_tz]:
2
3 #include "ram_quota.h"
4 #include "vm.h"
5
6 IMPLEMENT
7 Vm *
8 Vm_factory::create(Ram_quota *quota, int *err)
9 {
10   if (void *t = Vm::allocator()->q_alloc(quota))
11     {
12       Vm *a = new (t) Vm(quota);
13       if (a->initialize())
14         return a;
15
16       delete a;
17     }
18
19   *err = -L4_err::ENomem;
20   return 0;
21 }