Keil Logo


4.52 __user_heap_extend()

Defined in rt_misc.h, the __user_heap_extend() function can be defined to return extra blocks of memory, separate from the initial one, to be used by the heap.

If defined, this function must return the size and base address of an eight-byte aligned heap extension block.


extern unsigned __user_heap_extend(int var0, void **base, unsigned requested_size);


There is no default implementation of this function. If you define this function, it must have the following characteristics:
  • The returned size must be either:
    • A multiple of eight bytes of at least the requested size.
    • 0, denoting that the request cannot be honored.
  • The returned base address is aligned on an eight-byte boundary.
  • Size is measured in bytes.
  • The function is subject only to Procedure Call Standard for the ARM® Architecture (AAPCS) constraints.
  • The first argument is always zero on entry and can be ignored. The base is returned in the register holding this argument.


This function places a pointer to a block of at least the requested size in *base and returns the size of the block. 0 is returned if no such block can be returned, in which case the value stored at *base is never used.
Non-ConfidentialPDF file icon PDF versionARM DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  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.