DSPRelated.com
Forums

Dynamic memory allocation - help!

Started by motti_ch1 August 16, 2004
Hi there!

How do I allocate memory in DSK C6711?
I've to allocate a large amount of memory (about 100-500 thousands
of KB)..
Do I have to use the mem_alloc instruction? and if I do..how do i
use it? (what is "Int segid" in its syntax?)

Thank you !

Moti.



You can either use malloc or MEM_alloc or both. I
prefer MEM_alloc since it give the flexibility of
having multiple heaps in different sections of memory,
viz. external or internal, and also option of having
it aligned.

MEM_alloc would only work if you are using DSP/BIOS.
The "segid" argument refers to the ID of the segment.
Because you can create multiple heap in different
segments of the memory, you need to give the heap id
for each call. This ID is to be assigned in the
segment properties of DSP/BIOS configuration, as heap
Identifier label. Regards
Piyush

--- motti_ch1 <> wrote:

> Hi there!
>
> How do I allocate memory in DSK C6711?
> I've to allocate a large amount of memory (about
> 100-500 thousands
> of KB)..
> Do I have to use the mem_alloc instruction? and if I
> do..how do i
> use it? (what is "Int segid" in its syntax?)
>
> Thank you !
>
> Moti. >
>
> _____________________________________
> Note: If you do a simple "reply" with your email
> client, only the author of this message will receive
> your answer. You need to do a "reply all" if you
> want your answer to be distributed to the entire
> group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to > To Post: Send an email to
>
> To Leave: Send an email to > Archives: http://www.yahoogroups.com/group/c6x
>
> Other Groups: http://www.dsprelated.com
>
> Yahoo! Groups Links >
>


=====
**************************************
And---"A blind Understanding!" Heav'n replied.

Piyush Kaul
http://www.geocities.com/piyushkaul

__________________________________________________