49#define UHEAP_ALIGN PAGE_SIZE
83 DBGC ( &
uheap,
"UHEAP now at (%#08lx)...[%#08lx,%#08lx)\n",
103 assert ( uheap_used.size == 0 );
108 DBGC ( &
uheap,
"UHEAP largest region is [%#08lx,%#08lx)\n",
#define assert(condition)
Assert a condition at run-time.
uint32_t start
Starting offset.
uint16_t size
Buffer size.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
static void memmap_use(struct used_region *used, physaddr_t start, size_t size)
Update an in-use memory region.
static void memmap_dump_all(int hide)
Dump system memory map (for debugging)
#define __used_region
Declare an in-use memory region.
void * urealloc(void *ptr, size_t new_size)
Reallocate external memory.
#define PROVIDE_UMALLOC(_subsys, _api_func, _func)
Provide a user memory allocation API implementation.
#define LIST_HEAD_INIT(list)
Initialise a static list head.
void * heap_realloc(struct heap *heap, void *old_ptr, size_t new_size)
Reallocate memory.
void heap_populate(struct heap *heap, void *start, size_t len)
Add memory to allocation pool.
Dynamic memory allocation.
size_t memmap_largest(physaddr_t *start)
Find largest usable memory region.
uint32_t end
Ending offset.
int32_t after
Final microcode version.
int32_t before
Initial microcode version.
static void * uheap_realloc(void *old_ptr, size_t new_size)
Reallocate external memory.
physaddr_t uheap_end
End of external heap.
static void uheap_find(void)
Find an external heap region.
physaddr_t uheap_start
Start of external heap.
static void uheap_resize(ssize_t delta)
Adjust size of external heap in-use memory region.
physaddr_t uheap_limit
Minimum possible start of external heap.
static unsigned int uheap_grow(size_t size)
Attempt to grow external heap.
#define UHEAP_ALIGN
Alignment for external heap allocations.
static struct heap uheap
The external heap.
static unsigned int uheap_shrink(void *ptr, size_t size)
Allow external heap to shrink.