mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 20:05:54 +00:00
base: construct 'Tslab' with allocator reference
The new constructor avoids the use of a pointer.
This commit is contained in:
parent
f5bdab4518
commit
5b1e3466be
@ -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(); }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user