Keil™, An ARM® Company

Technical Support

GCC: CONFIGURING MALLOC FUNCTION


Information in this article applies to:

  • GNU C Compiler for ARM Version 3.22

QUESTION

I'm having problems with the ARM GNU compiler. It seems that the function malloc() never returns. What could be wrong in my application?

ANSWER

We use minimal startup code in several example projects to reduce the library overhead of the GNU compiler. The folder C:\Keil\ARM\GNU\Examples\Memory shows an example that initializes the memory heap for the malloc function. You should use this example as a starting point for your application.

Note that the startup code of this example is generic and not configured for any specific device. Therefore, you may need to add device specific initialization to the STARTUP.S file.

SEE ALSO

Last Reviewed: Monday, July 10, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure