Same as hrev43457 (- the error) but for the bootloader heap.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include <boot/platform.h>
|
#include <boot/platform.h>
|
||||||
#include <util/kernel_cpp.h>
|
#include <util/kernel_cpp.h>
|
||||||
|
|
||||||
|
#include <malloc.h>
|
||||||
#ifdef HEAP_TEST
|
#ifdef HEAP_TEST
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -329,6 +330,15 @@ malloc(size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void *
|
||||||
|
memalign(size_t alignment, size_t size)
|
||||||
|
{
|
||||||
|
// pseudo alignment by just upping the size
|
||||||
|
size = (size + alignment - 1) & ~(alignment - 1);
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void*
|
void*
|
||||||
realloc(void* oldBuffer, size_t newSize)
|
realloc(void* oldBuffer, size_t newSize)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user