Skip to content

Commit

Permalink
sculpt: upper limit for automatic quota upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
nfeske committed Mar 27, 2024
1 parent f955a10 commit c35c71a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions repos/gems/src/app/sculpt_manager/dialog/distant_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ class Dialog::Distant_runtime::View : private Views::Element
return false;

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;
}

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;
}

Expand Down
4 changes: 2 additions & 2 deletions repos/gems/src/app/sculpt_manager/model/child_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ struct Sculpt::Child_state : Noncopyable
return false;

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;
}

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;
}

Expand Down

0 comments on commit c35c71a

Please sign in to comment.