mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 16:35:28 +00:00
cli_monitor: consider instance count in quota check
In the start command when checking, whether the quota is enough to create the new instance, consider the count of instances that should be started.
This commit is contained in:
parent
59d6157441
commit
d4922f9071
@ -129,8 +129,9 @@ struct Start_command : Command
|
||||
cmd.parameter("--ram", ram);
|
||||
cmd.parameter("--ram-limit", ram_limit);
|
||||
|
||||
size_t preserve_ram = 1*1024*1024;
|
||||
if (ram + preserve_ram > Genode::env()->ram_session()->avail()) {
|
||||
/* acount for cli_monitor local metadata */
|
||||
size_t preserve_ram = 100*1024;
|
||||
if (count * (ram + preserve_ram) > Genode::env()->ram_session()->avail()) {
|
||||
tprintf(terminal, "Error: RAM quota exceeds available quota\n");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user