|
Muteki
EABI code execution on Besta® RTOS devices.
|
UI arena allocator functions. More...
#include "../types/framework.h"Go to the source code of this file.
Functions | |
| ui_component_t * | AllocBlock (size_t size, unsigned short tag, bool new_segment) |
| Allocate memory on the secondary heap. | |
| void | FreeBlock (ui_component_t *ptr) |
| Free memory previously allocated with AllocBlock(). | |
UI arena allocator functions.
Allocate/deallocate UI components using the UI arena allocator.
|
extern |
Allocate memory on the secondary heap.
This allocates a block of memory on the UI memory arena, that is backed by a large block of memory on the system heap. This arena is usually 64KiB in size.
| size | Size of the memory. |
| tag | Write this value to <allocated address> + 0x28 (<chunk address> + 0x30) when the allocated memory is located on a fresh chunk (i.e. allocated on previously unused memory directly following the last chunk). |
| new_segment | Set to true to start a new segment. This will prevent this chunk and all chunks above from being reused until this memory is freed. |
|
extern |
Free memory previously allocated with AllocBlock().
If a segment chunk is freed, everything below it will also be implicitly freed.
| ptr | Pointer to previously allocated memory. |