Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion zephyr/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ void *rballoc_align(uint32_t flags, uint32_t caps, size_t bytes,
heap = &l3_heap;
return (__sparse_force void *)l3_heap_alloc_aligned(heap, align, bytes);
#else
k_panic();
tr_err(&zephyr_tr, "L3_HEAP not available.");
return NULL;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will the propagate all the way up to the host?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default result of this call was to return NULL on allocation failure. I added k_panic() when L3_HEAP support was added to rballoc_allign(). Although this change exposed a bug in the IPC3 handling code, it seems that returning an allocation error is sufficient here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, not what I meant, I skipped the word "error". I mean't will the host properly be notified of this new allocation error path should it be hit.

#endif
} else {
heap = &sof_heap;
Expand Down