Commit 7f5fc11
Jyri Sarha
module_adapter: fix memory API debug check for DP modules
Add dp_thread field to module_resources so that the memory API debug
check accepts allocations from both the IPC thread (rsrc_mngr) and the
DP thread. Update MEM_API_CHECK_THREAD to check both thread IDs.
Also change mod_alloc_ctx allocation from rmalloc to rzalloc to
zero-initialize the structure. The code assumes the dp_thread member
is NULL in case of a non-DP module.
Both threads using the memory tracking features is not a problem
since the memory operations are synchronized with semaphores and
events so that both threads are never doing those operations at
the same time.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>1 parent 46d02e3 commit 7f5fc11
4 files changed
Lines changed: 9 additions & 3 deletions
File tree
- src
- audio/module_adapter
- module
- include/sof/audio/module_adapter/module
- schedule
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
507 | 511 | | |
508 | 512 | | |
509 | 513 | | |
| |||
0 commit comments