aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/boot.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/boot.h')
-rw-r--r--arch/x86/boot/boot.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 5f9a2e72a731..d2b5adf46512 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -17,6 +17,8 @@
17#ifndef BOOT_BOOT_H 17#ifndef BOOT_BOOT_H
18#define BOOT_BOOT_H 18#define BOOT_BOOT_H
19 19
20#define STACK_SIZE 512 /* Minimum number of bytes for stack */
21
20#ifndef __ASSEMBLY__ 22#ifndef __ASSEMBLY__
21 23
22#include <stdarg.h> 24#include <stdarg.h>
@@ -198,8 +200,6 @@ static inline int isdigit(int ch)
198} 200}
199 201
200/* Heap -- available for dynamic lists. */ 202/* Heap -- available for dynamic lists. */
201#define STACK_SIZE 512 /* Minimum number of bytes for stack */
202
203extern char _end[]; 203extern char _end[];
204extern char *HEAP; 204extern char *HEAP;
205extern char *heap_end; 205extern char *heap_end;
@@ -216,9 +216,9 @@ static inline char *__get_heap(size_t s, size_t a, size_t n)
216#define GET_HEAP(type, n) \ 216#define GET_HEAP(type, n) \
217 ((type *)__get_heap(sizeof(type),__alignof__(type),(n))) 217 ((type *)__get_heap(sizeof(type),__alignof__(type),(n)))
218 218
219static inline int heap_free(void) 219static inline bool heap_free(size_t n)
220{ 220{
221 return heap_end-HEAP; 221 return (int)(heap_end-HEAP) >= (int)n;
222} 222}
223 223
224/* copy.S */ 224/* copy.S */