Skip to content

Commit 05cd1f0

Browse files
author
Jyri Sarha
committed
modules: alloc API: Use rmalloc() instead of rbmalloc()
Forward mod_alloc() calls to rmalloc() instead of rbmalloc(). rballoc() calls are forwarded to virtual heap if it is enabled, but rmalloc() calls are not. The commit also removes if (alignment) condition, as rmalloc() will eventually end up to rmalloc_align() with zero alignment. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 64048da commit 05cd1f0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/audio/module_adapter/module/generic.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,7 @@ void *mod_alloc_align(struct processing_module *mod, uint32_t size, uint32_t ali
188188
}
189189

190190
/* Allocate memory for module */
191-
if (alignment)
192-
ptr = rballoc_align(SOF_MEM_FLAG_USER, size, alignment);
193-
else
194-
ptr = rballoc(SOF_MEM_FLAG_USER, size);
191+
ptr = rmalloc_align(SOF_MEM_FLAG_USER, size, alignment);
195192

196193
if (!ptr) {
197194
comp_err(mod->dev, "mod_alloc: failed to allocate memory for comp %x.",

0 commit comments

Comments
 (0)