mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-23 12:35:41 +00:00
bomb test: consider preserved PD session quota
This is an adaptation to the commit "core: prevent transfer of static PD session quota".
This commit is contained in:
parent
f278024e44
commit
5566aa0f94
@ -173,8 +173,15 @@ struct Bomb
|
||||
|
||||
void construct_children()
|
||||
{
|
||||
unsigned long avail_ram = env.ram().avail_ram().value;
|
||||
Ram_quota const ram_amount { (avail_ram - ram_demand) / children };
|
||||
size_t const preserved_ram = Pd_connection::RAM_QUOTA;
|
||||
size_t const avail_ram = env.ram().avail_ram().value;
|
||||
|
||||
if (avail_ram < preserved_ram + ram_demand) {
|
||||
error("RAM demand exceeds available RAM");
|
||||
return;
|
||||
}
|
||||
|
||||
Ram_quota const ram_amount { (avail_ram - preserved_ram - ram_demand) / children };
|
||||
|
||||
if (ram_amount.value < (ram_demand * children)) {
|
||||
log("I'm a leaf node - generation ", generation,
|
||||
@ -183,7 +190,7 @@ struct Bomb
|
||||
}
|
||||
|
||||
size_t const avail_caps = env.pd().avail_caps().value;
|
||||
size_t const preserved_caps = children*10;
|
||||
size_t const preserved_caps = children*30;
|
||||
|
||||
if (avail_caps < preserved_caps) {
|
||||
log("I ran out of capabilities.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user