base: extend cap_session with memory allocator

Required to allocate memory to remember per session created capabilities.
During session destruction all capabilities have to be freed up.
This commit is contained in:
Alexander Boettcher
2012-11-28 12:13:11 +01:00
committed by Norman Feske
parent f9b82a7b8e
commit 8c4e1b7eb0
7 changed files with 26 additions and 2 deletions

View File

@ -33,6 +33,8 @@ namespace Genode {
public:
Cap_session_component(Allocator *md_alloc, const char *args) {}
Native_capability alloc(Native_capability ep)
{
Lock::Guard lock_guard(_lock());

View File

@ -160,6 +160,7 @@ namespace Genode {
Platform_env_base(Ram_session_capability(),
Cpu_session_capability(),
Pd_session_capability()),
_cap_session(platform()->core_mem_alloc(), "ram_quota=4K"),
_entrypoint(&_cap_session),
_ram_session(&_entrypoint, &_entrypoint,
platform()->ram_alloc(), platform()->core_mem_alloc(),