diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index cc0ef13..f087238 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -205,7 +205,13 @@ static inline int isdigit(int ch) extern char _end[]; extern char *HEAP; extern char *heap_end; -#define RESET_HEAP() ((void *)( HEAP = _end )) + +static inline void *RESET_HEAP(void) +{ + HEAP = _end; + memset(HEAP, 0, heap_end-HEAP); + return HEAP; +} static inline char *__get_heap(size_t s, size_t a, size_t n) { char *tmp;