Hi all i am working on SHARC 21060 using VDSP++ 3.5.i have reached a stage in my project,where i have to combine various modules which will be invoked in sequential manner, at differnt times, in real time. how memory can be reused which has been reserved for on particulae code.i want to free memory as soon as role of one code is over.what are the approaces? so far i was working in an offline mode by colecting dataand running my code on that data.what are the approaches to make it real time?i am trying by using Chained DMA? is there any other way? it will be very helpful to me if somebody can give clues about how to approach these problems.any literature or website on this? Thanks in adavnce sandeep Kumar |
|
memory reusabilty and real time
Started by ●June 22, 2004
Reply by ●June 23, 20042004-06-23
On Tue, 22 Jun 2004, sandeep kumar wrote: > Hi all > i am working on SHARC 21060 using VDSP++ 3.5.i have reached a > stage in my project,where i have to combine various modules which > will be invoked in sequential manner, at differnt times, in real time. > how memory can be reused which has been reserved for on particulae > code.i want to free memory as soon as role of one code is over.what > are the approaces? > so far i was working in an offline mode by colecting > dataand running my code on that data.what are the approaches to make > it real time?i am trying by using Chained DMA? is there any other way? > > it will be very helpful to me if somebody can give clues about how to > approach these problems.any literature or website on this? Look up "malloc" and "alloc" on the web and follow all references to sited papers. There are a lot of ways to do this. The simplest way is to force your own overlaps - you know when a chunk of memory is used for one routine and when that routine is finished you can use it for another routine. Create pointers to buffers and use the same pointer for multiple purposes. Once you get past simple, life becomes very complicated. If you can specify one block size and use it for all routines, and they don't run into each other, then simple is the way to go. Otherwise, better read up on "heaps" and "stacks". Patience, persistence, truth, Dr. mike |
|
Reply by ●June 24, 20042004-06-24
Are you using C/C++ or ASM? You could set aside a generic buffer that you would interpret (say using a structure pointer to the buffer) according to the modality of the subroutine/module. Your code will run faster than using the heap tools (malloc/free new/delete). If you do plan on using the heap, ADI provides the source for the standard routines they use. In some cases, it may be advantageous to rewrite malloc/free(speed up allocation and prevent fragmentation problems). I've seen a malloc function where data was granted in chunks rather then on the base size of the processor. In order to determine memory usage a set of allocated/freed pointers were defined. --- In , Mike Rosing <eresrch@e...> wrote: > On Tue, 22 Jun 2004, sandeep kumar wrote: > > > Hi all > > i am working on SHARC 21060 using VDSP++ 3.5.i have reached a > > stage in my project,where i have to combine various modules which > > will be invoked in sequential manner, at differnt times, in real time. > > how memory can be reused which has been reserved for on particulae > > code.i want to free memory as soon as role of one code is over.what > > are the approaces? > > so far i was working in an offline mode by colecting > > dataand running my code on that data.what are the approaches to make > > it real time?i am trying by using Chained DMA? is there any other way? > > > > it will be very helpful to me if somebody can give clues about how to > > approach these problems.any literature or website on this? |