Keil Logo

ARMCC: INIT_MEMPOOL FOR HEAP SETUP DOES NOT EXIST


Information in this article applies to:

  • MDK5
  • Legacy projects made with C51, C166, or CARM tools

QUESTION

I am porting code from the Keil C51, C166 Compiler or legacy CARM compiler to the Arm Compiler. I have used the function init_mempool to configure the heap size for the memory allocation functions malloc or calloc. I cannot find this function in the Arm compiler. How should I configure the heap for the memory pool?

ANSWER

The Arm compiler and libraries do not need the init_mempool function. Instead, configure the entry HeapSize in the device startup file - see startup_device.s for details. To edit this file, open the Manage Run-Time Environment and select the device :: startup file. Then, Configure the Startup Code. It is uncommon, but some users may want to further customize things, see: Choosing a heap implementation for memory allocation functions.

For additional control, use the RTX5 Memory Allocation features to better control access to memory. See Stack, Heap and RTOS Configuration.

Notefor CARM: There is a discontinued product called CARM required that init_mempool be called before using calloc, free, malloc, or realloc. This is not required for the Arm Compilers.

MORE INFORMATION FOR ARM COMPILER 6

MORE INFORMATION FOR ARM COMPILER 5

SEE ALSO

Last Reviewed: Thursday, March 7, 2019


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.