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.

Memset Algorithm Handle to zero

Hello,

We have an extended handle object for our codec engine:

typedef struct OUR_ALGORITHM_Obj
{
IALG_Obj alg; /* MUST be first field of all XDAS algs */
IDMA3_Handle dmaHandles[ MAX_DMA_HANDLES ];
void *memSegments[ MEM_NUM_SEGMENTS ];
int iDummy;
int iDummy2;
 |    |
int iDummyn;
}
OUR_ALGORITHM_Obj;

If we do the following in OUR_ALGORITHM_initObj():

OUR_ALGORITHM_Obj ourAlgorithmObj;
memset(&ourAlgorithmObj, 0, sizeof(OUR_ALGORITHM_Obj));

The codec crashes on the DM6446.

I figure something in the structure is filled in before OUR_ALGORITHM_initObj(), either the IALG_Obj at the start or the IDMA3_Handle array by OUR_ALGORITHM_dmaInit().

Could anyone explain this?

Thanks,

Matt