mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-05 19:15:05 +00:00
0afa9db2de
for use by malloc(). This breaks the image-loading code (which previously used the heap to allocate the buffer for downloading the image), but that's not a major concern since I'm going to tear out all the image formats within the next couple of days anyway. Byebye, NBI! :)
28 lines
358 B
C
28 lines
358 B
C
#include <malloc.h>
|
|
#include <gpxe/heap.h>
|
|
|
|
/**
|
|
* @file
|
|
*
|
|
* Heap
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* Heap size
|
|
*
|
|
* Currently fixed at 48kB.
|
|
*/
|
|
#define HEAP_SIZE ( 48 * 1024 )
|
|
|
|
/** The heap itself */
|
|
char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
|
|
|
|
/**
|
|
* Initialise the heap
|
|
*
|
|
*/
|
|
void init_heap ( void ) {
|
|
mpopulate ( heap, sizeof ( heap ) );
|
|
}
|