From 5b1e3466befc443ad533fb664de03e0ad3a86abc Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sun, 7 May 2017 23:15:49 +0200 Subject: [PATCH] base: construct 'Tslab' with allocator reference The new constructor avoids the use of a pointer. --- repos/base/include/base/tslab.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/base/include/base/tslab.h b/repos/base/include/base/tslab.h index 3feb3e1f1c..b47a207ef0 100644 --- a/repos/base/include/base/tslab.h +++ b/repos/base/include/base/tslab.h @@ -26,6 +26,10 @@ struct Genode::Tslab : Slab : Slab(sizeof(T), BLOCK_SIZE, initial_sb, backing_store) { } + Tslab(Allocator &backing_store, void *initial_sb = 0) + : Slab(sizeof(T), BLOCK_SIZE, initial_sb, &backing_store) + { } + T *first_object() { return (T *)Slab::any_used_elem(); } };