Talk:C6RunLib Documentation

Comments on C6RunLib Documentation -

Joachim said ...
When passing pointers they are converted into an address valid for the DSP. It seems to be very important to only pass pointers that were previously returned by C6RUN_MEM_malloc or other above mentioned functions. (I.e. the beginning of the allocated space.) Passing a pointer that just points to an address within the allocated space would crash the whole system. Also passing an array of pointers or a structure containing pointers doesn't work because address translation won't work then.

--Joachim 04:17, 30 December 2010 (CST)

D-allred said ...
The issue with passing pointers within an allocated space (instead of just the base pointer of that allocated space) should be fixed with the 0.95.02.02 release. Note that cache ops will still take place on the entire allocated region, which could potentially impact performance. The issue of passing pointers through multiple levels of indirection (pointers to pointers) is not something we can yet handle.

--D-allred 14:34, 3 January 2011 (CST)

Dw said ...
Using version 0.97.03.03 I've had success passing pointers to locations within an allocated space, but I've had issues (oddly enough) passing pointers returned by C6RUN_MEM_malloc, depending on where the call was made to allocate them. I have a program with 3 threads, with all shared memory malloc calls occurring in the main thread, and I can't pass some of the buffers I've allocated in shared memory (actually, they are buffers whose pointers reside in a struct on the ARM side, but the buffers themselves are allocated using the C6RUN malloc). What's odd is that when I allocate the space for these buffers in the thread that calls the DSP-side libraries that use them, I have no issues. I suppose it's possible that some overwriting is happening or that I'm corrupting the stack somehow, but upon making the offending function call for the first time (when it fails with a c6lookupbuffer type error), the pointer to the buffer allocated in shared memory still points to the location it was originally initialized to point to.

--Dw 11:57, 3 August 2011 (CDT)