mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
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:
@ -75,7 +75,7 @@ class Genode::Platform : public Platform_generic
|
||||
bool valid_addr(addr_t ) const override { ASSERT_NEVER_CALLED; }
|
||||
bool alloc(size_t, void **) override { ASSERT_NEVER_CALLED; }
|
||||
|
||||
Alloc_return alloc_aligned(size_t, void **, int, addr_t, addr_t) override
|
||||
Alloc_return alloc_aligned(size_t, void **, unsigned, Range) override
|
||||
{ ASSERT_NEVER_CALLED; }
|
||||
|
||||
Alloc_return alloc_addr(size_t, addr_t) override
|
||||
@ -94,10 +94,9 @@ class Genode::Platform : public Platform_generic
|
||||
return true;
|
||||
}
|
||||
|
||||
Alloc_return alloc_aligned(size_t, void **out_addr, int,
|
||||
addr_t, addr_t) override
|
||||
Alloc_return alloc_aligned(size_t, void **out, unsigned, Range) override
|
||||
{
|
||||
*out_addr = 0;
|
||||
*out = 0;
|
||||
return Alloc_return::OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user