Stack memory in DirAC decoder
The DirAC decoder uses a mechanism of allocatting and deallocating stack memory in functions ivas_dirac_alloc_mem()
and ivas_dirac_free_mem()
.
However, there are two issues with the current approach:
-
malloc()
/free()
routines are used insideivas_dirac_alloc_mem()
andivas_dirac_free_mem()
. If the related memory is really the dynamic one (TBC), the memory should be allocated usingdynamic_malloc()
anddynamic_free()
, otherwise it is counted as part of the Static RAM when the code is instrumented using the WMC-tool. - When
dynamic_malloc()
anddynamic_free()
is used, there is no mechanism how this memory is related to the stack numbers of the whole codec.- Should
dynamic_malloc()
anddynamic_free()
be called at every frame?
- Should