Skip to content

Commit 8461592

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 f271764 commit 8461592

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
@@ -185,10 +185,7 @@ void *mod_alloc_align(struct processing_module *mod, uint32_t size, uint32_t ali
185185
}
186186

187187
/* Allocate memory for module */
188-
if (alignment)
189-
ptr = rballoc_align(SOF_MEM_FLAG_USER, size, alignment);
190-
else
191-
ptr = rballoc(SOF_MEM_FLAG_USER, size);
188+
ptr = rmalloc_align(SOF_MEM_FLAG_USER, size, alignment);
192189

193190
if (!ptr) {
194191
comp_err(mod->dev, "failed to allocate memory.");

0 commit comments

Comments
 (0)