A number of core jobs, such as memory allocation, string operations, or file management, are performed by a group of internal API calls. Due to portability requirements, the standard C library is used very sparingly, and the C++ libraries are not used at all.
There are a large number of utility functions. I cannot cover them all in this book, but I provide a representative sample in Table 3-5.
Table 3-5. Common utility functions
Portability wrapper around
Frees the blocks allocated with
Allocates memory for a set of pointers, and points each to its respective part of one big block. Consider the example:
char *p1, *p2, *block; if (!(block = my_multi_malloc (MYF (MY_WME), &p1,10,&p2,20,NULL)) goto err;