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.

Memory allocated by memTab[] can not be exchanged?



Dear Experts,

If two memories are allocated inside OMAP DSP with Codec Engine help, I found they can not be exchanged, is that right?

Example:

int * A;

int *B;

A=memTab[1];// the memTab[1] has been allocated in initial part.

B=memTab[2]; // the memTab[2] has been allocated in initial part.

 

Question: how can we exchange the two pointers A and B?

 

Thanks,

 

Dave

 

 

 

 

 

  • I don't understand what you're asking.

    The memTab[] array is just a table of memory descriptors to memory the alg requested.  What do you mean 'exchange' them?

    Note that the data type of a memTab[] element (e.g. memTab[1]) is an IALG_MemRec (not an int * as your psuedocode seems to assume).  If you want the A and B vars to point at the _data_ each memTab[] points to, the assignment might look like this instead:

    int *A = memTab[1].base;   // A points at the data in memTab[1]
    int *B = memTab[2].base;   // B points at the data in memTab[2]

    Chris