base: construct 'Tslab' with allocator reference

The new constructor avoids the use of a pointer.
This commit is contained in:
Norman Feske 2017-05-07 23:15:49 +02:00 committed by Christian Helmuth
parent f5bdab4518
commit 5b1e3466be

View File

@ -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(); }
};