|
Sound Open Firmware
|
Functions | |
| void * | rmalloc_align (uint32_t flags, size_t bytes, uint32_t alignment) |
| Allocates memory block. | |
| void * | rmalloc (uint32_t flags, size_t bytes) |
| Similar to rmalloc_align(), but no alignment can be specified. | |
| void * | rzalloc (uint32_t flags, size_t bytes) |
| Similar to rmalloc(), guarantees that returned block is zeroed. | |
| void * | rballoc_align (uint32_t flags, size_t bytes, uint32_t alignment) |
| Allocates memory block. | |
| static void * | rballoc (uint32_t flags, size_t bytes) |
| Similar to rballoc_align(), returns buffer aligned to PLATFORM_DCACHE_ALIGN. | |
| void | rfree (void *ptr) |
| Frees the memory block. | |
| void | l3_heap_save (void) |
| Save L3 heap over DSP reset. | |
| void * | sof_heap_alloc (struct k_heap *heap, uint32_t flags, size_t bytes, size_t alignment) |
| void | sof_heap_free (struct k_heap *heap, void *addr) |
| static struct k_heap * | sof_sys_heap_get (void) |
| struct k_heap * | sof_sys_user_heap_get (void) |
| Returns heap object to use for SOF heap allocations for audio application code. | |
| static void | heap_trace_all (int force) |
Allocation flags | |
| #define | SOF_MEM_FLAG_DMA BIT(2) |
| Allocate DMA-able memory. | |
| #define | SOF_MEM_FLAG_NO_COPY BIT(3) |
| realloc() skips copying the original content. | |
| #define | SOF_MEM_FLAG_COHERENT BIT(4) |
| Allocate uncached address. | |
| #define | SOF_MEM_FLAG_L3 BIT(5) |
| Allocate L3 address. | |
| #define | SOF_MEM_FLAG_LOW_POWER BIT(6) |
| Allocate Low power memory address. | |
| #define | SOF_MEM_FLAG_KERNEL BIT(7) |
| Allocate kernel memory address. | |
| #define | SOF_MEM_FLAG_USER BIT(8) |
| Allocate user memory address. | |
| #define | SOF_MEM_FLAG_USER_SHARED_BUFFER BIT(9) |
| Allocate shared user memory address. | |
| #define | SOF_MEM_FLAG_LARGE_BUFFER BIT(10) |
| Use allocation method for large buffers. | |
| #define SOF_MEM_FLAG_COHERENT BIT(4) |
Allocate uncached address.
| #define SOF_MEM_FLAG_DMA BIT(2) |
Allocate DMA-able memory.
| #define SOF_MEM_FLAG_KERNEL BIT(7) |
Allocate kernel memory address.
| #define SOF_MEM_FLAG_L3 BIT(5) |
Allocate L3 address.
| #define SOF_MEM_FLAG_LARGE_BUFFER BIT(10) |
Use allocation method for large buffers.
| #define SOF_MEM_FLAG_LOW_POWER BIT(6) |
Allocate Low power memory address.
| #define SOF_MEM_FLAG_NO_COPY BIT(3) |
realloc() skips copying the original content.
| #define SOF_MEM_FLAG_USER BIT(8) |
Allocate user memory address.
| #define SOF_MEM_FLAG_USER_SHARED_BUFFER BIT(9) |
Allocate shared user memory address.
|
inlinestatic |
| void l3_heap_save | ( | void | ) |
Save L3 heap over DSP reset.
|
inlinestatic |
Similar to rballoc_align(), returns buffer aligned to PLATFORM_DCACHE_ALIGN.
| void * rballoc_align | ( | uint32_t | flags, |
| size_t | bytes, | ||
| uint32_t | alignment ) |
Allocates memory block.
| flags | Flags, see SOF_MEM_FLAG_... |
| bytes | Size in bytes. |
| alignment | Alignment in bytes. |
| void rfree | ( | void * | ptr | ) |
Frees the memory block.
| ptr | Pointer to the memory block. |
| void * rmalloc | ( | uint32_t | flags, |
| size_t | bytes ) |
Similar to rmalloc_align(), but no alignment can be specified.
| void * rmalloc_align | ( | uint32_t | flags, |
| size_t | bytes, | ||
| uint32_t | alignment ) |
Allocates memory block.
| flags | Flags, see SOF_MEM_FLAG_.... |
| bytes | Size in bytes. |
| alignment | Alignment in bytes. |
| void * rzalloc | ( | uint32_t | flags, |
| size_t | bytes ) |
Similar to rmalloc(), guarantees that returned block is zeroed.
| void * sof_heap_alloc | ( | struct k_heap * | heap, |
| uint32_t | flags, | ||
| size_t | bytes, | ||
| size_t | alignment ) |
| void sof_heap_free | ( | struct k_heap * | heap, |
| void * | addr ) |
|
inlinestatic |
| struct k_heap * sof_sys_user_heap_get | ( | void | ) |
Returns heap object to use for SOF heap allocations for audio application code.
The returned value may be NULL. This matches with semantics of sof_heap_alloc() that allows passing NULL as the 'heap'. In this case, the heap implementation will choose the heap to use.
The function should not be used for heap allocations for objects that are only used in SOF kernel space.
Note: audio modules should use mod_alloc() instead!