-
Notifications
You must be signed in to change notification settings - Fork 349
Heap refinement Part 4 -- zones merged #4747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
79e0727
59afda0
5e86bce
3a8fdca
86fb3b7
de206ad
39bb769
079ffe5
00992ee
bf6289c
96487ce
8ec50db
1a1526a
acbbfa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,14 +38,14 @@ struct comp_buffer *buffer_alloc(uint32_t size, uint32_t caps, uint32_t align) | |
| } | ||
|
|
||
| /* allocate new buffer */ | ||
| buffer = rzalloc(SOF_MEM_ZONE_RUNTIME_SHARED, 0, SOF_MEM_CAPS_RAM, | ||
| buffer = rballoc(SOF_MEM_FLAG_COHERENT, SOF_MEM_CAPS_RAM, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry, I'm totally confused now. I thought
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It is just replacement here, as we will remove the RUNTIME_SHARED zone thoroughly in the subsequent commits. The naming is not so important to me, for the allocator, it doesn't know about what the required buffer will be used for, @lgirdwood asked me to do a "Part 5" to unify the rxxalloc() helpers, at that time we will have only e.g. rmalloc() and rzalloc(), and the allocator internal will decide where (which zone) it will allocate the required buffer on.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lyakh direction of travel is simplification of allocator to align with Zephyr |
||
| sizeof(*buffer)); | ||
| if (!buffer) { | ||
| tr_err(&buffer_tr, "buffer_alloc(): could not alloc structure"); | ||
| return NULL; | ||
| } | ||
|
|
||
| buffer->lock = rzalloc(SOF_MEM_ZONE_RUNTIME_SHARED, 0, SOF_MEM_CAPS_RAM, | ||
| buffer->lock = rballoc(SOF_MEM_FLAG_COHERENT, SOF_MEM_CAPS_RAM, | ||
| sizeof(*buffer->lock)); | ||
| if (!buffer->lock) { | ||
| rfree(buffer); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to explain why. Just because it's a relatively large allocation of 1K?