Skip to content

Commit 60d4760

Browse files
author
Jyri Sarha
committed
topology2: Add lifetime and shared -bytes_requirement widget attributes
Add lifetime_bytes_requirement and shared_bytes_requirement widget attributes. This token's value indicates the amount of heap memory needed at component initialization phase. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent ba38a8c commit 60d4760

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

tools/topology/topology2/include/common/tokens.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Object.Base.VendorToken {
2828
scheduler_domain 418
2929
domain_id 419
3030
stack_bytes_requirement 420
31-
heap_bytes_requirement 421
31+
interim_heap_bytes_requirement 421
32+
lifetime_heap_bytes_requirement 422
33+
shared_bytes_requirement 423
3234
}
3335

3436
"2" {

tools/topology/topology2/include/components/widget-common.conf

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,27 @@ DefineAttribute."stack_bytes_requirement" {
149149
token_ref "comp.word"
150150
}
151151

152-
## Heap size requirement in bytes for this component. Zero indicates default heap size.
153-
DefineAttribute."heap_bytes_requirement" {
152+
## Interim Heap size requirement in bytes for this component.
153+
## Used for resources that may change in size or be freed during the lifetime of the component.
154+
## In practice this means anything allocated outside module's init() call-back.
155+
DefineAttribute."interim_heap_bytes_requirement" {
156+
# Token set reference name and type
157+
token_ref "comp.word"
158+
}
159+
160+
## Lifetime heap memory allocation requirement in bytes for this component.
161+
## This token's value indicates the amount of allocated memory needed at component init phase
162+
## and used over the lifetime of the component until the component is destroyed.
163+
## In practice this means anything allocated in init() call-back.
164+
DefineAttribute."lifetime_heap_bytes_requirement" {
165+
# Token set reference name and type
166+
token_ref "comp.word"
167+
}
168+
169+
## Shared memory allocation requirement in bytes for this component.
170+
## This token's value indicates the amount of shared memory the component may need to allocated.
171+
## Shared memory may be shared to other components.
172+
DefineAttribute."shared_bytes_requirement" {
154173
# Token set reference name and type
155174
token_ref "comp.word"
156175
}

0 commit comments

Comments
 (0)