Uh oh!
There was an error while loading. Please reload this page.
Module api rest of the modules - #10195
Conversation
5a81bd2 to
69b18c4Compare6067aa8 to
32e83e3Compare| else | ||
| ptr = rballoc(SOF_MEM_FLAG_USER, size); | ||
| ptr = rmalloc(SOF_MEM_FLAG_USER, size); |
There was a problem hiding this comment.
Should we also rmalloc_aligned() above for rballoc_aligned()
There was a problem hiding this comment.
That is a good question. Pretty much the same as should we use virtual heap in the modules at all? There were some rballoc_aligned() calls in the modules, but I do not recall any rmalloc_aligned() calls.
And there is a reason for that. There is no rmalloc_aligned() at the moment. I can of cource easily create one in zephyr/lib/alloc.c and follow the pattern that call is alway forwarded to zephyr system heap. Should I take that route?
There was a problem hiding this comment.
I created rmalloc_align() and took that into use.
6d16a80 to
8f5ea1cComparejsarha
commented
Sep 5, 2025
Please let me know if you want me to split this into multiple PRs. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
8f5ea1c to
2337ac2CompareConvert auditory, dct, fft, and matrix math tests to use module heap API functions instead of the old version using rmalloc() and friends directly. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Both unit tests and modules should now use the module API heap allocation functions, so we can now remove the directly heap using versions. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. The rballoc() calls are converted to mod_balloc(), except module pdata is allocated with mod_alloc() as its obviously not an audio buffer. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. However, the rtnr_stub's heap access, rtk_alloc() and rtk_free() still use heap directly like before. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. The IPC3 implementation of selector uses the component interface directly and can not use the new module API. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. The one rballoc() call is converted to mod_balloc(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. The two rballoc() calls are converted to mod_balloc(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Add mod_psy_free_mel_filterbank() for freeing the allocated memory. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix memory leaks from auditory cmocka test. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix all memory leaks found from fft test when tests were run under Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix all memory leaks found from matrix test when tests were run under Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Add mod_dct_free_16() to free memory allocated by mod_dct_initialize_16(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix memory leaks found by running the tests with Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix memory freeing error from module_adapter_test_free(). Use free_test_source() for sources, not free_test_sink(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix all memory leaks found from volume test when tests were run under Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix all memory leaks found from mux_copy test when tests were run under Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix all memory leaks found from demux_copy test when tests were run under Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix all memory leaks found from all pipeline tests when tests were run under Valgrind. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
c624018 to
fce2c50CompareThe current rballoc_align() implementation has this line: assert(IS_ALIGNED(mem, align)); Which will cause division by zero due to IS_ALIGNED() Zephyr implementation: define IS_ALIGNED(ptr, align) (((uintptr_t)(ptr)) % (align) == 0) So better use sizeof(void *) as the default value. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
f042224 to
c449fe3Comparejsarha
commented
Nov 12, 2025
All these commits, or their further developed versions have been merged. |
Modules ASRC, Aria, Copier, crossover, multiband_drc, and DRC were aready once reviewed as part of #10164 .