How to understand the heap usage in mcuxpresso

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to understand the heap usage in mcuxpresso

ソリューションへジャンプ
1,366件の閲覧回数
andréluis
Contributor II

Hello. I'm working with freeRtos using MCUxpresso and RT1176. I'm trying to understand how to work with the heap usage of freertos. My question is if below each function, the values ​​allocated after it are related to the function or can be other allocations. For example, in the following image I have two functions and below them is an allocated value and some free values. Are they related to the function? Thank you.

0 件の賞賛
返信
1 解決策
1,236件の閲覧回数
mayliu1
NXP Employee
NXP Employee

Hi @andréluis ,

 

Thanks for your updated information.

The Task TCB is a data structure allocated by FreeRTOS for each task, used to store critical information such as the task's runtime state, priority, stack information, and context.

The "Allocated" refers to heap memory allocated through pvPortMalloc, as well as resources occupied by operating system services (such as semaphores, queues, timers, etc.).

The TCB and "Allocated" are distinct concepts with no direct relationship.

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,304件の閲覧回数
mayliu1
NXP Employee
NXP Employee

Hi @andréluis ,

 

Thank you so much for your interest in our products and for using our community.

I think your question is related to the FreeRTOS memory management algorithm.

FreeRTOS provides a total of 5 dynamic memory management algorithms, heap_1.c, heap_2.c, heap_3.c, heap_4.c, and heap_5.c.

So could you please check which memory management algorithm is in your project.

I also would like give you a FreeRTOS link to you.

FreeRTOS heap memory management - FreeRTOS™

 

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu

0 件の賞賛
返信
1,292件の閲覧回数
andréluis
Contributor II
Hello Mayliu, how are you? In this case, I don't need to modify the heap. What I need to understand is how this heap usage table works. For example, are the parts that are allocated related to the function in which these allocations are located below in the table? In the image, I have a function called FORTE and right below it it says allocated. In this case, is this allocated related to the FORTE function or is it some other allocation? Thanks.
0 件の賞賛
返信
1,237件の閲覧回数
mayliu1
NXP Employee
NXP Employee

Hi @andréluis ,

 

Thanks for your updated information.

The Task TCB is a data structure allocated by FreeRTOS for each task, used to store critical information such as the task's runtime state, priority, stack information, and context.

The "Allocated" refers to heap memory allocated through pvPortMalloc, as well as resources occupied by operating system services (such as semaphores, queues, timers, etc.).

The TCB and "Allocated" are distinct concepts with no direct relationship.

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu

0 件の賞賛
返信
1,201件の閲覧回数
andréluis
Contributor II
Now i understand MayLiu. Thanks for the help.
0 件の賞賛
返信