base: introduce Ram_allocator::try_alloc

This patch replaces the 'Ram_allocator::alloc' RPC function by a
'try_alloc' function, which reflects errors as 'Attempt' return value
instead of an exception.

Issue #4322
Issue #3612
This commit is contained in:
Norman Feske
2021-11-08 21:05:11 +01:00
committed by Christian Helmuth
parent 959bcae557
commit 231ac187fe
20 changed files with 324 additions and 122 deletions

View File

@ -79,7 +79,7 @@ class Stack_area_region_map : public Genode::Region_map
struct Stack_area_ram_allocator : Genode::Ram_allocator
{
Genode::Ram_dataspace_capability alloc(Genode::size_t, Genode::Cache) override {
Alloc_result try_alloc(Genode::size_t, Genode::Cache) override {
return Genode::Ram_dataspace_capability(); }
void free(Genode::Ram_dataspace_capability) override { }