]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/plr/server/src/app_loading.cc
update
[l4.git] / l4 / pkg / plr / server / src / app_loading.cc
index e6aad63d7f72e7591fa98d2e74517485b46cd71b..e5e897a34ed8d4b9c4e1570535b4d108ad43a35f 100644 (file)
@@ -7,7 +7,7 @@
  *    Implementation of application loading. Similar to the stuff
  *    moe and ned do.
  *
- * (c) 2011-2012 Björn Döbel <doebel@os.inf.tu-dresden.de>,
+ * (c) 2011-2013 Björn Döbel <doebel@os.inf.tu-dresden.de>,
  *     economic rights: Technische Universität Dresden (Germany)
  * This file is part of TUD:OS and distributed under the terms of the
  * GNU General Public License 2.
@@ -187,12 +187,8 @@ Romain::App_model::add_env()
 
 Romain::App_model::Dataspace Romain::App_model::alloc_ds(unsigned long size) const
 {
-       Dataspace ds = L4Re::Util::cap_alloc.alloc<L4Re::Dataspace>();
-       _check(!ds.is_valid(), "ds cap allocation failed");
-
-       long r = L4Re::Env::env()->mem_alloc()->alloc(size, ds);
-       _check(r != 0, "dataspace allocation failed");
-
+       Dataspace ds;
+       Romain::Region_map::allocate_ds(&ds, size);
        return ds;
 }