2007-01-18 20:11:04 +00:00
|
|
|
#include <gpxe/malloc.h>
|
2006-05-16 15:00:36 +00:00
|
|
|
#include <gpxe/heap.h>
|
2005-05-12 16:34:57 +00:00
|
|
|
|
2006-05-16 15:00:36 +00:00
|
|
|
/**
|
|
|
|
|
* @file
|
2005-05-12 16:34:57 +00:00
|
|
|
*
|
2006-05-16 15:00:36 +00:00
|
|
|
* Heap
|
2005-05-12 16:34:57 +00:00
|
|
|
*
|
|
|
|
|
*/
|
2005-05-13 11:24:02 +00:00
|
|
|
|
2006-05-16 15:00:36 +00:00
|
|
|
/**
|
|
|
|
|
* Heap size
|
2005-05-12 16:34:57 +00:00
|
|
|
*
|
2007-02-01 07:22:13 +00:00
|
|
|
* Currently fixed at 128kB.
|
2005-05-12 16:34:57 +00:00
|
|
|
*/
|
2007-02-01 07:22:13 +00:00
|
|
|
#define HEAP_SIZE ( 128 * 1024 )
|
2005-05-13 11:24:02 +00:00
|
|
|
|
2006-05-16 15:00:36 +00:00
|
|
|
/** The heap itself */
|
|
|
|
|
char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2006-05-16 15:00:36 +00:00
|
|
|
/**
|
|
|
|
|
* Initialise the heap
|
2005-05-13 13:20:16 +00:00
|
|
|
*
|
|
|
|
|
*/
|
2006-05-16 15:00:36 +00:00
|
|
|
void init_heap ( void ) {
|
|
|
|
|
mpopulate ( heap, sizeof ( heap ) );
|
2005-05-13 13:20:16 +00:00
|
|
|
}
|