mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-12 05:23:20 +00:00
base: enforce ram_quota donations to be consistent
For several basic sessions that core provides default ram quota values exist in the form of enum values. They are used e.g. by init to deduce session costs. Unfortunately they were not used when actually establishing the session, which lead to inconsistencies. Ref #1443
This commit is contained in:
parent
a93266548f
commit
554146d39c
@ -22,7 +22,7 @@ namespace Genode { struct Cpu_connection; }
|
||||
|
||||
struct Genode::Cpu_connection : Connection<Cpu_session>, Cpu_session_client
|
||||
{
|
||||
enum { RAM_QUOTA = 32*1024 };
|
||||
enum { RAM_QUOTA = 36*1024 };
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -36,8 +36,8 @@ struct Genode::Cpu_connection : Connection<Cpu_session>, Cpu_session_client
|
||||
Affinity const &affinity = Affinity())
|
||||
:
|
||||
Connection<Cpu_session>(
|
||||
session(affinity, "priority=0x%lx, ram_quota=36K, label=\"%s\"",
|
||||
priority, label)),
|
||||
session(affinity, "priority=0x%lx, ram_quota=%u, label=\"%s\"",
|
||||
priority, RAM_QUOTA, label)),
|
||||
Cpu_session_client(cap()) { }
|
||||
};
|
||||
|
||||
|
@ -30,8 +30,8 @@ struct Genode::Pd_connection : Connection<Pd_session>, Pd_session_client
|
||||
* \param label session label
|
||||
*/
|
||||
Pd_connection(char const *label = "", Native_pd_args const *pd_args = 0)
|
||||
:
|
||||
Connection<Pd_session>(session("ram_quota=4K, label=\"%s\"", label)),
|
||||
: Connection<Pd_session>(session("ram_quota=%u, label=\"%s\"",
|
||||
RAM_QUOTA, label)),
|
||||
Pd_session_client(cap())
|
||||
{ }
|
||||
};
|
||||
|
@ -32,8 +32,8 @@ struct Genode::Ram_connection : Connection<Ram_session>, Ram_session_client
|
||||
unsigned long phys_size = 0UL)
|
||||
:
|
||||
Connection<Ram_session>(
|
||||
session("ram_quota=64K, phys_start=0x%lx, phys_size=0x%lx, "
|
||||
"label=\"%s\"", phys_start, phys_size, label)),
|
||||
session("ram_quota=%u, phys_start=0x%lx, phys_size=0x%lx, "
|
||||
"label=\"%s\"", RAM_QUOTA, phys_start, phys_size, label)),
|
||||
|
||||
Ram_session_client(cap())
|
||||
{ }
|
||||
|
@ -32,8 +32,8 @@ struct Genode::Rm_connection : Connection<Rm_session>, Rm_session_client
|
||||
*/
|
||||
Rm_connection(addr_t start = ~0UL, size_t size = 0) :
|
||||
Connection<Rm_session>(
|
||||
session("ram_quota=64K, start=0x%p, size=0x%zx",
|
||||
start, size)),
|
||||
session("ram_quota=%u, start=0x%p, size=0x%zx",
|
||||
RAM_QUOTA, start, size)),
|
||||
Rm_session_client(cap()) { }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user