This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2650: Memory allocation issue

Part Number: CC2650
Other Parts Discussed in Thread: Z-STACK

Hi,

I ran into a very difficult to solve issue with memory allocation. I'm using Z-Stack home 1.2.2 on CC2650 with IAR compiler. Memory profiling is turned on and the problem I see is similar to the one in (which is unanswered).

I see heapmgr_memub (upper bound) increasing while the other values stay more or less the same. It continues until memUb reaches the heap size, then the CC2650 crashes.

My question is, what might be the cause of memory upper bound increasing? As far as I can see, all allocated buffers are freed. Is it some kind of fragmentation?

Best Regards,

Sjef.

  • Hi Sjef,

    Are you running a clean fresh sample app?

    Regards,

  • Hi Jose,

    I'm not running a sample app but a modified ZNP firmware. The modification removes the MT subsystem and uses the NPI task to send custom frames instead of MT frames.

    When commenting out the call to UART_write in npi_tl_uart (and giving the write callback immediately) everything looks fine, so I ruled out any memory leak due to wrong use of dynamic memory in the layers above the actual UART driver.

    I'm looking for ways to solve this, and using a sample application is no solution.

    So, the main question is: What might be causing mem_ub to increase, while at the same time mem_alo / mem_max do not increase? Is it fragmentation?

    Regards,

    Sjef.