mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 14:37:50 +00:00
sculpt: upper limit for automatic quota upgrading
This commit is contained in:
parent
e53b00aafb
commit
06c4b0248b
@ -202,12 +202,12 @@ class Dialog::Distant_runtime::View : private Views::Element
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (child.has_sub_node("ram") && child.sub_node("ram").has_attribute("requested")) {
|
if (child.has_sub_node("ram") && child.sub_node("ram").has_attribute("requested")) {
|
||||||
_ram.value *= 2;
|
_ram.value = min(2*_ram.value, 32*1024*1024u);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child.has_sub_node("caps") && child.sub_node("caps").has_attribute("requested")) {
|
if (child.has_sub_node("caps") && child.sub_node("caps").has_attribute("requested")) {
|
||||||
_caps.value += 100;
|
_caps.value = min(_caps.value + 100, 2000u);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,12 +106,12 @@ struct Sculpt::Child_state : Noncopyable
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (child.has_sub_node("ram") && child.sub_node("ram").has_attribute("requested")) {
|
if (child.has_sub_node("ram") && child.sub_node("ram").has_attribute("requested")) {
|
||||||
_ram_quota.value *= 2;
|
_ram_quota.value = min(_ram_quota.value*2, 256*1024*1024u);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child.has_sub_node("caps") && child.sub_node("caps").has_attribute("requested")) {
|
if (child.has_sub_node("caps") && child.sub_node("caps").has_attribute("requested")) {
|
||||||
_cap_quota.value += 100;
|
_cap_quota.value = min(_cap_quota.value + 100, 5000u);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user