Hello,
I'm using simplelink_cc13x2_26x2_sdk_5_20_00_52. My application periodically enqueues some data to the BLE application queue, to do so I use Util_enqueueMsg -> ICall_malloc -> ICall_heapMalloc.
From time to time the execution enters in a neverending loop inside ICall_heapMalloc, HEAPMGR_MALLOC in rtos_heaposal.h, do {...} while(1);
do
{
if (tmp & HEAPMGR_IN_USE)
{
tmp ^= HEAPMGR_IN_USE; always enter this block
coal = 0;
}
else
{
if (coal != 0)
{
#ifdef HEAPMGR_METRICS
HEAPMGR_BLKCNT--;
HEAPMGR_BLKFREE--;
#endif // HEAPMGR_METRICS
*prev += *hdr;
if (*prev >= size)
{
hdr = prev;
tmp = *hdr;
break;
}
}
else
{
if (tmp >= size)
{
break;
}
coal = 1;
prev = hdr;
}
}
hdr = (heapmgrHdr_t *)((hmU8_t *)hdr + tmp);
tmp = *hdr;
if (tmp == 0)
{
hdr = NULL;
break; never enters here and loops again forever
}
}
while (1);
By the way I had other problems with Icall malloc in the past (there are other posts from me about that). Is it mandatory ? cannot I use standard malloc ?
Thanks
Fabio