From 82929f8a76b4a5f185f9f39cbec3eb42ace7fc06 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 10 Dec 2011 19:07:33 +0100 Subject: [PATCH] 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. --- src/system/runtime_loader/heap.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/system/runtime_loader/heap.cpp b/src/system/runtime_loader/heap.cpp index 03346a978e..61a815d701 100644 --- a/src/system/runtime_loader/heap.cpp +++ b/src/system/runtime_loader/heap.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -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) {