#include <stdlib.h>
void init_mempool (
void xdata *p, /* start of memory pool */
unsigned int size); /* length of memory pool */
Description
The init_mempool function initializes the memory management
routines and provides the starting address and size of the memory
pool. The p argument points to a memory area in
xdata which is managed using the calloc, free,
malloc, and realloc library functions. The size argument specifies the number of bytes to use for the
memory pool.
Note
This function must be used to setup the memory pool before
any other memory management functions (calloc,
free, malloc, realloc) can be called. Call
the init_mempool function only once at the beginning of
your program.
Source code for this routine is provide in the LIB
folder. You may modify the source to customize this function for
your particular hardware environment.
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.