core: add Platform::max_caps()

This method returns the kernel-specific system-global limit of the total
number of capabilities.

Issue #2398
This commit is contained in:
Norman Feske
2017-05-07 22:44:15 +02:00
committed by Christian Helmuth
parent 82a98065a0
commit bc82cce72b
14 changed files with 105 additions and 39 deletions

View File

@ -134,6 +134,8 @@ namespace Genode {
{
construct_at<Cap_index_allocator_tpl<T, SZ> >(this);
}
size_t max_caps() const override { return SZ; }
};
}

View File

@ -113,6 +113,11 @@ namespace Genode {
* Redo construction of the object
*/
virtual void reinit() = 0;
/**
* Return capacity of allocator
*/
virtual size_t max_caps() const = 0;
};