You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

heap.c 358B

123456789101112131415161718192021222324252627
  1. #include <malloc.h>
  2. #include <gpxe/heap.h>
  3. /**
  4. * @file
  5. *
  6. * Heap
  7. *
  8. */
  9. /**
  10. * Heap size
  11. *
  12. * Currently fixed at 48kB.
  13. */
  14. #define HEAP_SIZE ( 48 * 1024 )
  15. /** The heap itself */
  16. char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
  17. /**
  18. * Initialise the heap
  19. *
  20. */
  21. void init_heap ( void ) {
  22. mpopulate ( heap, sizeof ( heap ) );
  23. }