Use the memory allocation functions to specify, allocate, and free
blocks of memory from a memory pool. All memory allocation functions
are implemented as functions and are prototyped in the stdlib.h include file.
Before using any of these functions to allocate memory, you must
first specify the size and location of the memory pool using the
init_mempool routine. All memory requests are satisfied using
this memory block.
The calloc and malloc routines allocate blocks of
memory from the pool. The calloc routine allocates an array
with a specified number of elements of a given size and initializes
the array to 0. The malloc routine allocates a specified
number of bytes.
The realloc routine changes the size of an allocated block
while the free routine returns a previously allocated memory
block to the memory pool.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.