RL-ARM User's Guide

Memory Allocation Routines

RoutineAttributesDescription
_declare_boxCreates a memory pool of fixed size blocks with 4-byte alignment.
_declare_box8Creates a memory pool of fixed size blocks with 8-byte alignment.
_init_boxInitializes a memory pool with 4-byte aligned blocks.
_init_box8Initializes a memory pool with 8-byte aligned blocks.
_alloc_boxReentrantAllocates a memory block from a memory pool.
_calloc_boxReentrantAllocates a memory block from a memory pool, and clears the contents of the block to 0.
_free_boxReentrantReturns a memory block back to its memory pool.

note

  • The memory allocation routines enable you to use the system memory dynamically by creating memory pools and using fixed size blocks from the memory pools.
  • The _init_box8, _declare_box and _declare_box8 routines are implemented as macros.