cli_monitor: make preservation limit a hard limit
When a child requests more ram resources, it gets blocked immediately when the preservation limit is reached. Otherwise, it might happen that the cli_monitor runs out of memory.
This commit is contained in:
parent
e0be6b9ed6
commit
2329184ddb
|
@ -112,12 +112,15 @@ class Ram
|
|||
{
|
||||
Genode::Lock::Guard guard(_lock);
|
||||
|
||||
if (_ram.avail() < (_preserve + amount)) {
|
||||
Genode::Signal_transmitter(_yield_sigh).submit();
|
||||
throw Transfer_quota_failed();
|
||||
}
|
||||
|
||||
int const ret = _ram.transfer_quota(to, amount);
|
||||
|
||||
if (ret != 0)
|
||||
throw Transfer_quota_failed();
|
||||
|
||||
_validate_preservation();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue