mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
libc: use 'alloc_aligned()' in fd allocator
`Allocator_avl_base::alloc()` now uses address size alignment, so `Allocator_avl_base::alloc_aligned()` must be used for 1-byte alignment. Fixes #2915
This commit is contained in:
parent
526680e977
commit
deb839ba6f
@ -59,7 +59,7 @@ File_descriptor *File_descriptor_allocator::alloc(Plugin *plugin,
|
||||
/* allocate fresh fd if the default value for 'libc_fd' was specified */
|
||||
bool alloc_ok = false;
|
||||
if (libc_fd <= ANY_FD)
|
||||
alloc_ok = Allocator_avl_base::alloc(1, reinterpret_cast<void**>(&addr));
|
||||
alloc_ok = Allocator_avl_base::alloc_aligned(1, reinterpret_cast<void**>(&addr), 0).ok();
|
||||
else
|
||||
alloc_ok = (Allocator_avl_base::alloc_addr(1, addr).ok());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user