AnsweredAssumed Answered

Memory returned by 'malloc' function is not word aligned

Question asked by rahul.mohan on Apr 7, 2017
Latest reply on Apr 18, 2017 by Kader.M

Hi All,


I am developing an audio application on ADSP-21489 platform. For dynamically allocating a large pool of memory, used C-run-time library function 'malloc'.

The C/C++ Compiler Manual for SHARC Processors specifies that - "functions such as malloc() only return double-word
aligned memory". But when I checked the pointer returned by my malloc call, it seems like only byte aligned. 


Is there any way to specify that the malloc function should return word aligned memory ?


Tool chain details:

  CrossCore Embedded Studio

  C/C++ Development Tooling Source 

  C/C++ Development Tools

  C/C++ Compiler : SHARC version (Aug 26 2016 18:45:47), BUILD-B-REL-CCES2_4-20160826_1812