core: RAM service based on 'Session_object'

This patch reworks the implementation of core's RAM service to make use
of the 'Session_object' and to remove the distinction between the
"metadata" quota and the managed RAM quota. With the new implementation,
the session implicitly allocates its metadata from its own account. So
there is not need to handle 'Out_of_metadata' and 'Quota_exceeded' via
different exceptions. Instead, the new version solely uses the
'Out_of_ram' exception.

Furthermore, the 'Allocator::Out_of_memory' exception has become an alias
for 'Out_of_ram', which simplifies the error handling.

Issue #2398
This commit is contained in:
Norman Feske
2017-05-08 19:55:54 +02:00
committed by Christian Helmuth
parent 028e633af4
commit e44f65f3b2
32 changed files with 486 additions and 366 deletions

View File

@ -220,7 +220,7 @@ class Net::Root : public Genode::Root_component<Net::Session_component>
} catch (Mac_allocator::Alloc_failed) {
Genode::warning("Mac address allocation failed!");
throw Root::Unavailable();
} catch(Ram_session::Quota_exceeded) {
} catch (Out_of_ram) {
Genode::warning("insufficient 'ram_quota'");
throw Insufficient_ram_quota();
}