diff --git a/repos/os/src/server/nitpicker/gui_session.h b/repos/os/src/server/nitpicker/gui_session.h index 6221d60fd9..03dc0c9f7a 100644 --- a/repos/os/src/server/nitpicker/gui_session.h +++ b/repos/os/src/server/nitpicker/gui_session.h @@ -132,9 +132,20 @@ class Nitpicker::Gui_session : public Session_object, List _view_list { }; - Tslab _view_alloc { &_session_alloc }; + /* + * Slab allocator that includes an initial block as member + */ + template + struct Initial_slab_block { uint8_t buf[BLOCK_SIZE]; }; + template + struct Slab : private Initial_slab_block, Tslab + { + Slab(Allocator &block_alloc) + : Tslab(block_alloc, Initial_slab_block::buf) { }; + }; - Tslab _view_ref_alloc { &_session_alloc }; + Slab _view_alloc { _session_alloc }; + Slab _view_ref_alloc { _session_alloc }; bool const _provides_default_bg;