Move include/malloc.h to include/gpxe/malloc.h, since everything in there
[people/xl0/gpxe.git] / src / core / heap.c
1 #include <gpxe/malloc.h>
2 #include <gpxe/heap.h>
3
4 /**
5  * @file
6  *
7  * Heap
8  *
9  */
10
11 /**
12  * Heap size
13  *
14  * Currently fixed at 48kB.
15  */
16 #define HEAP_SIZE ( 48 * 1024 )
17
18 /** The heap itself */
19 char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
20
21 /**
22  * Initialise the heap
23  *
24  */
25 void init_heap ( void ) {
26         mpopulate ( heap, sizeof ( heap ) );
27 }