mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
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:
committed by
Norman Feske
parent
f9b82a7b8e
commit
8c4e1b7eb0
@ -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());
|
||||
|
@ -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(),
|
||||
|
Reference in New Issue
Block a user