Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 367
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
79e072759afda05e86bce3a8fdca86fb3b7de206ad39bb769079ffe500992eebf6289c96487ce8ec50db1a1526aacbbfa5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
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 ContributorAuthor 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); | ||
Uh oh!
There was an error while loading. Please reload this page.
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?