42#define NOWHERE ( ( void * ) ~( ( intptr_t ) 0 ) )
103#define CACHE_DISCARDERS __table ( struct cache_discarder, "cache_discarders" )
106#define __cache_discarder( cost ) __table_entry ( CACHE_DISCARDERS, cost )
113#define CACHE_CHEAP 01
114#define CACHE_NORMAL 02
115#define CACHE_EXPENSIVE 03
uint16_t offset
Offset to command line.
#define __malloc
Declare a pointer returned by a function as a unique memory address as returned by malloc-type functi...
uint32_t start
Starting offset.
uint16_t size
Buffer size.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
void *__malloc malloc_phys_offset(size_t size, size_t phys_align, size_t offset)
Allocate memory with specified physical alignment and offset.
void * heap_realloc(struct heap *heap, void *old_ptr, size_t new_size)
Reallocate memory.
void *__malloc malloc_phys(size_t size, size_t phys_align)
Allocate memory with specified physical alignment.
void heap_dump(struct heap *heap)
Dump free block list (for debugging)
void free_phys(void *ptr, size_t size)
Free memory allocated with malloc_phys()
void heap_populate(struct heap *heap, void *start, size_t len)
Add memory to allocation pool.
unsigned int(* discard)(void)
Discard some cached data.
size_t usedmem
Total amount of used memory.
size_t freemem
Total amount of free memory.
size_t ptr_align
Alignment for size-tracked allocations.
unsigned int(* grow)(size_t size)
Attempt to grow heap (optional)
struct list_head blocks
List of free memory blocks.
size_t maxusedmem
Maximum amount of used memory.
size_t align
Alignment for free memory blocks.
unsigned int(* shrink)(void *ptr, size_t size)
Allow heap to shrink (optional)
A doubly-linked list entry (or list head)