Add support for aligned allocation

Add a memalign function and have malloc use it. Also,
change the default alignment for malloc to u64-aligned.

Change-Id: I0788637008f5cb5ac801d8bbdc430ca992c98e81
Signed-off-by: Ron Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/887
Tested-by: build bot (Jenkins)
Reviewed-by: Mathias Krause <minipli@googlemail.com>
This commit is contained in:
Ron Minnich
2012-04-11 10:30:15 -07:00
committed by Patrick Georgi
parent 3925622638
commit eb59636cc5
2 changed files with 17 additions and 7 deletions

View File

@ -12,6 +12,7 @@
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#if !defined(__PRE_RAM__)
void *memalign(size_t boundary, size_t size);
void *malloc(size_t size);
void free(void *ptr);
#endif