⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
zhongc@ilink-wi...
Offline
Last seen:5 months 2 weeks ago
加入:2017-05-09 12:36
dis_heaplog()

Hi MT_dialog,

As your mention about the CFG_LOG_HEAP_USAGE , the disp_heaplog()function is work, I can track the heap size as follow.
We use app_easy_timer() function to exec task period.When it first run app_easy_timer(),the MSG HEAP is only about 132,and MSG HEAP didn't increase during the task.however,when it finish the first app_easy_timer() and begin to run app_easy_timer() at the second time,MSG HEAP increase to 4244.Is it normal?Why?

*** Memory Logging Results ***

>>> ENV HEAP <<<
Used size in this HEAP : 188 (current) - 2860 (maximum)
Used size in other HEAPs: 0 (current) - 0 (maximum)

> > > DB堆< < <
Used size in this HEAP : 2328 (current) - 2328 (maximum)
Used size in other HEAPs: 0 (current) - 0 (maximum)

>>> MSG HEAP <<<
Used size in this HEAP : 132 (current) - 4244 (maximum)
Used size in other HEAPs: 0 (current) - 0 (maximum)

>>> Non-Ret HEAP <<<
Used size in this HEAP : 0 (current) - 628 (maximum)
Used size in other HEAPs: 0 (current) - 0 (maximum)

Keywords:
Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi zhongc,

Hi zhongc,

The tool offers you a method in order track the maximum sizes of the heaps implemented on the fw, what do you mean if its normal ? in your message heap are stored all the messages that the application sends towards the stack, the profiles etc and back, so all the communication back and forth is reflected in that number and not just the timer that you have set, also the 4244 is the maximum value that the heap reached at some point and not the current value, the current value is 132.

Thanks MT_dialog

zhongc@ilink-wi...
Offline
Last seen:5 months 2 weeks ago
加入:2017-05-09 12:36
Hii MT_Dialog,

Hii MT_Dialog,
Thanks for your answer.In my heap log,the MSG HEAP maximum value is 4244,as you mention,the MAX heap reached at some point.In my project,At the first time the timer work ,the heap is about 126,but when the tmer finish and the timer(task) start work agian,The MSG heap reached to the MAX(4244) size, Why?I think maybe there is something wrong in my project and I want to reduce the MSG HEAP,How can I analysis and solve?
I use disp_heaplog() to track the heap size every 1s, I am not sure the MAX heap happen at the end of the first timer or at the begin of the second timer.,Just as follow:
app_easy_timer(任务,10 s);//The first time: >>> MSG HEAP <<< Used size in this HEAP : 132 (current) - 132(maximum)
do function 1; >>> MSG HEAP <<< Used size in this HEAP : 132 (current) - 132(maximum)
do function 2; >>> MSG HEAP <<< Used size in this HEAP : 132 (current) - 132(maximum)
......
app_easy_timer(TASK,10S); //The second time >>> MSG HEAP <<< Used size in this HEAP : 4244(current) - 4244 (maximum)------reached the max
do function 1; >>> MSG HEAP <<< Used size in this HEAP : 132 (current) - 4244 (maximum)
do function 2; >>> MSG HEAP <<< Used size in this HEAP : 132 (current) - 4244 (maximum)
......

MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi zhongc,

Hi zhongc,

As allready mentioned the utility that you are using is designed in order for you to be able to find the optimal size for your heaps and not tracing back from where the allocation occured, regarding why the heap reaches at that size depends what your fw does between the timer setting and when the time elapses, i dont have any specific guidelines to provide in order for you to check where that allocation occurs except checking and debugging your project and check any possible allocation that could increase the size of your heap. I dont see that kind of size during a setting of a kernel timer on the SDK examples i 've tested.

Thanks MT_dialog

zhongc@ilink-wi...
Offline
Last seen:5 months 2 weeks ago
加入:2017-05-09 12:36
Hi MT_dialog,

Hi MT_dialog,
Thanks,I will debug the project to fix it.

MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi zhongc,

Hi zhongc,

If the above answers had helped, please mark it as accepted.

Thanks MT_dialog