I'm suddenly getting a failure assertion from HeapMemMP_create():
Assertion at Line no: 385 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-
linux-gnueabi/ti-syslink-02_00_00_68-r3i/syslink_02_00_00_68_beta1/ti/syslink/ut
ils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/HeapMemMPDrv.
c: (cargs.args.create.handle != NULL) : failed
Here is the code:
/*
Setup a heap for messages
Inputs:
theInfo : Pointer to the message info set by the DSP
*/
HeapMemMP_Handle initializeMessageheap(App_Info *theInfo)
{
Int32 status = 0;
UInt16 procId;
SizeT heapSize = 0;
HeapMemMP_Params heapMemParams;
HeapMemMP_Handle heapMH = NULL;
IHeap_Handle srHeap = NULL;
Ptr ptr = NULL;
procId = MultiProc_getId ("DSP");
/* Create Heap and register it with MessageQ */
Osal_printf("Creating the heap\n");
HeapMemMP_Params_init (&heapMemParams);
heapMemParams.sharedAddr = NULL;
heapSize = HeapMemMP_sharedMemReq (&heapMemParams)
+ 2*(theInfo->numQueues * sizeof(MSG2));
//get a handle to the shared heap in region 0
srHeap = SharedRegion_getHeap (REGIONID0);
if (srHeap == NULL) {
Osal_printf ("SharedRegion_getHeap failed for %d processor\n", procId);
return(NULL);
}
ptr = Memory_alloc (srHeap,
heapSize,
0,
NULL);
if (ptr == NULL) {
Osal_printf ("Memory_alloc failed for %d processor\n", procId);
return(NULL);
}
//messages use region 0
heapMemParams.name = theInfo->heapName;
heapMemParams.regionId = REGIONID0;
heapMemParams.sharedAddr = ptr;
heapMemParams.sharedBufSize = heapSize;
heapMH = HeapMemMP_create (&heapMemParams);
if (heapMH == NULL) {
Osal_printf ("HeapMemMP_create failed for %d processor\n", procId);
return(NULL);
}
/* Register this heap */
Osal_printf ("Registering heapId %d with MessageQ for procId: %d\n",
theInfo->heapId,
procId);
MessageQ_registerHeap (&heapMH, theInfo->heapId);
return(heapMH);
}
HeapMemMP_create is returning NULL. REGIONID0=0, theInfo->heapid=0, and the heap size is 2088 bytes, there is more than enough space in shared region 0.
Any idea what is wrong?
Lee Holeva