Commit 9ff0a7a
alloc: sof_heap: Add missing support for shared buffers in sof_heap_alloc
Add missing support for the SOF_MEM_FLAG_USER_SHARED_BUFFER flag in the
sof_heap_alloc function.
Add a generic function is_heap_pointer that allows checking whether
a given pointer belongs to a given heap. It is used in the sof_heap_free
function to ensure that the freed pointer belongs to the specified heap,
and if not, to free it using rfree.
Signed-off-by: Adrian Warecki <[email protected]>1 parent c30f5bc commit 9ff0a7a
2 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
158 | 177 | | |
159 | 178 | | |
160 | 179 | | |
| |||
628 | 647 | | |
629 | 648 | | |
630 | 649 | | |
631 | | - | |
| 650 | + | |
632 | 651 | | |
633 | 652 | | |
634 | 653 | | |
| |||
642 | 661 | | |
643 | 662 | | |
644 | 663 | | |
645 | | - | |
| 664 | + | |
646 | 665 | | |
647 | 666 | | |
648 | 667 | | |
| |||
0 commit comments