/*
* \brief Simple allocator implementation
- * \author Christian Helmuth
- * \author Bjoern Doebel
- * \date 2008-08-26
*
* This simple allocator provides malloc() and free() using dm_mem dataspaces
* as backing store. The actual list-based allocator implementation is from
* ddekit_large_malloc and ddekit_slab_*() should be used. The blocks
* allocated via this allocator CANNOT be used for DMA or other device
* operations, i.e., there exists no virt->phys mapping.
+ */
+
+/*
+ * This file is part of DDEKit.
+ *
+ * (c) 2006-2012 Bjoern Doebel <doebel@os.inf.tu-dresden.de>
+ * Christian Helmuth <ch12@os.inf.tu-dresden.de>
+ * Thomas Friebel <tf13@os.inf.tu-dresden.de>
+ * economic rights: Technische Universitaet Dresden (Germany)
*
- * (c) 2006-2008 Technische Universität Dresden
- * This file is part of TUD:OS, which is distributed under the terms of the
- * GNU General Public License 2. Please see the COPYING file for details.
+ * This file is part of TUD:OS and distributed under the terms of the
+ * GNU General Public License 2.
+ * Please see the COPYING-GPL-2 file for details.
*/
/*
if (err < 0)
goto err_out;
- err = L4Re::Env::env()->rm()->attach(&res, ds_size, L4Re::Rm::Search_addr, ds, 0);
+ err = L4Re::Env::env()->rm()->attach(&res, ds_size, L4Re::Rm::Search_addr, L4::Ipc::make_cap_rw(ds), 0);
if (err < 0)
goto err_out;
}
err_out:
+ // FIXME: goto is error prone in C++
+ // FIXME: missing nearly all free operations here
pthread_mutex_unlock(&malloc_mtx);
return p;