kernel: Move aligned_alloc to heap.cpp alongside calloc.
It is independent of whatever heap implementation is actually in use, so it belongs in here (even if this file is probably not the right place for such functions in the first place.) This allows the kernel to be built once again with things other than the default slab heap.
This commit is contained in:
parent
8e059bfa63
commit
4b6af34c06
@ -2493,6 +2493,16 @@ calloc(size_t numElements, size_t size)
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
aligned_alloc(size_t alignment, size_t size)
|
||||
{
|
||||
if ((size % alignment) != 0)
|
||||
return NULL;
|
||||
|
||||
return memalign(alignment, size);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
deferred_free(void *block)
|
||||
{
|
||||
|
@ -229,16 +229,6 @@ 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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user