core: equip RPC-cap-factory slab with static block

This patch applies the approach of the "core: equip signal-context slab
with initial block" patch to the RPC-capability slab allocator.

Issue #2407
This commit is contained in:
Norman Feske 2017-05-11 19:44:23 +02:00 committed by Christian Helmuth
parent 963a6c37a0
commit d31642e8be
2 changed files with 6 additions and 2 deletions

View File

@ -35,7 +35,10 @@ class Genode::Rpc_cap_factory
Cap_object(addr_t cap_sel) : _cap_sel(cap_sel) {}
};
Tslab<Cap_object, 128> _slab;
enum { SBS = 960*sizeof(long) };
uint8_t _initial_sb[SBS];
Tslab<Cap_object, SBS> _slab;
List<Cap_object> _list;
Lock _lock;

View File

@ -80,7 +80,8 @@ void Rpc_cap_factory::free(Native_capability cap)
}
Rpc_cap_factory::Rpc_cap_factory(Allocator &md_alloc) : _slab(&md_alloc) { }
Rpc_cap_factory::Rpc_cap_factory(Allocator &md_alloc)
: _slab(md_alloc, _initial_sb) { }
Rpc_cap_factory::~Rpc_cap_factory()