base: Refine Range_allocator::alloc_aligned

This patch changes the 'alloc_aligned' interface as follows:

- The former 'from' and 'to' arguments are replaced by a single
  'range' argument.

- The distinction of the use cases of regular allocations vs.
  address-constrained allocations is now overed by a dedicated
  overload instead of relying on a default argument.

- The 'align' argument has been changed from 'int' to 'unsigned'
  to be better compatible with 'addr_t' and 'size_t'.

Fixes #4067
This commit is contained in:
Norman Feske
2021-04-06 16:20:01 +02:00
parent 97d44c5a79
commit f925fef17b
14 changed files with 68 additions and 49 deletions

View File

@ -76,7 +76,7 @@ class Pci_driver : public Bsd::Bus_driver
Pci_driver &drv)
: Genode::Allocator_avl(&alloc), env(env), _drv(drv) { }
Genode::addr_t alloc(Genode::size_t size, int align)
Genode::addr_t alloc(Genode::size_t size, unsigned align)
{
using namespace Genode;