
Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
Hi, I am wondering if there is a function corresponding to the _aligned_malloc() from MSVC in CCS libraries. I need to align a dynamic array and since it.s not global I cant use the DATA_ALIGN pragma... Thanks for your time, Esben.______________________________
You may write dynamic memory allocation to the index of CCS help document. There explained some peculiarities. For example : instead of a definition such as: struct big table[100]; use a pointer and call the malloc function: struct big *table; table = (struct big *)malloc(100*sizeof(struct big)); On 4/29/06, esbn8 <s...@hotmail.com> wrote: > > Hi, > I am wondering if there is a function corresponding to the > _aligned_malloc() from MSVC in CCS libraries. > > I need to align a dynamic array and since it.s not global I cant use > the DATA_ALIGN pragma... > > Thanks for your time, Esben.______________________________
If you're using DSP/BIOS, have a look at the MEM_alloc() function in the DSP/BIOS API. Its third parameter allows you to specify the alignment. Regards, Guy. On 4/29/06, esbn8 <s...@hotmail.com> wrote: > > Hi, > I am wondering if there is a function corresponding to the > _aligned_malloc() from MSVC in CCS libraries. > > I need to align a dynamic array and since it.s not global I cant use > the DATA_ALIGN pragma... > > Thanks for your time, Esben.______________________________
Hi, I think you can allocate memory using and malloc() and align it as you want. regards, Suresh -----Original Message----- From: c...@yahoogroups.com [mailto:c...@yahoogroups.com]On Behalf Of esbn8 Sent: Saturday, April 29, 2006 12:00 PM To: c...@yahoogroups.com Subject: [c6x] aligned malloc Hi, I am wondering if there is a function corresponding to the _aligned_malloc() from MSVC in CCS libraries. I need to align a dynamic array and since it.s not global I cant use the DATA_ALIGN pragma... Thanks for your time, Esben. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or a...@tataelxsi.co.in______________________________