Add a simplistic memalign() to the runtime_loader heap.
As KMessage now makes use of memalign() the simple heap in the runtime_loader needs to provide that as well. Fixes build.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <syscalls.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -318,6 +319,15 @@ restart:
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
memalign(size_t alignment, size_t size)
|
||||
{
|
||||
// pseudo alignment by just upping the size
|
||||
size = (size + alignment - 1) & ~alignment;
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
free(void *allocated)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user