2006-05-16 15:00:36 +00:00
|
|
|
#include <malloc.h>
|
|
|
|
#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
|
|
|
*
|
2006-05-16 15:00:36 +00:00
|
|
|
* Currently fixed at 48kB.
|
2005-05-12 16:34:57 +00:00
|
|
|
*/
|
2006-05-16 15:00:36 +00:00
|
|
|
#define HEAP_SIZE ( 48 * 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
|
|
|
}
|