forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Audio: MDRC: Restructure MDRC for effective memory allocation
Remove redundant struct multiband_drc_coefficients and simplify memory management by handling memory allocation directly. 1. Removed `struct multiband_drc_coefficients` from multiband_drc.h and multiband_drc.c. 2. Updated `multiband_drc_init` function to eliminate the allocation of the obsolete `coefficients_block`. 3. Adjusted `multiband_drc_free` to no longer check and free the now-nonexistent `coefficients_block`. 4. Directly handled memory allocation and initialization of crossover, emphasis, and de-emphasis coefficients in `multiband_drc_init_coef`. 5. Simplified overall memory management, removing unnecessary layers of indirection. This change reduces memory allocation overhead, improves data locality to enhance cache efficiency, and mitigates heap fragmentation. The refactoring of memory management adds robustness to the component by reducing the chances of memory leaks and simplifying the initialization and cleanup process. By streamlining memory management, the update lowers the possibility of memory leaks. Ensured thorough testing to verify no functionality is broken or new issues introduced. Signed-off-by: Shriram Shastry <[email protected]>
- Loading branch information
1 parent
28a5265
commit 9ce82c1
Showing
2 changed files
with
110 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters