Skip to content

Commit 3012dac

Browse files
author
Jyri Sarha
committed
lib: fast-get: use vregion_type from mod_alloc_ctx
Use vregion_type from struct mod_alloc_ctx to control which vregion memory type fast_get() uses for allocations. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 1564f2d commit 3012dac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zephyr/lib/fast-get.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ const void *fast_get(struct mod_alloc_ctx *alloc, const void *dram_ptr, size_t s
194194
}
195195

196196
if (alloc && alloc->vreg && size <= FAST_GET_MAX_COPY_SIZE)
197-
/* A userspace allocation, that won't be shared */
198-
ret = vregion_alloc_align(alloc->vreg, VREGION_MEM_TYPE_INTERIM, alloc_size,
197+
/* Use mem type set by caller (mod_fast_get sets per module state) */
198+
ret = vregion_alloc_align(alloc->vreg, alloc->vregion_type, alloc_size,
199199
alloc_align);
200200
else
201201
ret = sof_heap_alloc(heap, alloc_flags, alloc_size, alloc_align);

0 commit comments

Comments
 (0)