kernel: Add aligned_alloc implementation.

Needed by default with GCC 11.
This commit is contained in:
Augustin Cavalier 2021-11-17 13:58:43 -05:00
parent 7ec1bedeed
commit 46c49135a0

View File

@ -229,6 +229,16 @@ posix_memalign(void** _pointer, size_t alignment, size_t size)
}
void *
aligned_alloc(size_t alignment, size_t size)
{
if ((size % alignment) != 0)
return NULL;
return memalign(alignment, size);
}
void
free_etc(void *address, uint32 flags)
{