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 <syscalls.h>
|
||||||
#include <util/kernel_cpp.h>
|
#include <util/kernel_cpp.h>
|
||||||
|
|
||||||
|
#include <malloc.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.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
|
void
|
||||||
free(void *allocated)
|
free(void *allocated)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user