2
0
mirror of https://github.com/xcat2/xNBA.git synced 2025-01-05 19:15:05 +00:00
xNBA/src/core/heap.c
Michael Brown 0afa9db2de Tear out old heap code, replace with code that simply allocates memory
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!  :)
2006-05-16 15:00:36 +00:00

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 ) );
}