The malloc() function allocates size bytes of memory. The allocated space is suitably aligned (after possible pointer coercion) for storage of any type of object. If the space is at least pagesize bytes in length (see getpagesize((3)),) the returned memory will be page boundary aligned as well. If malloc() fails, a NULL pointer is returned. The calloc() function allocates space for number objects, each size bytes in length. The result is identical to calling malloc() with an argument of ``number * size'', with the exception that the allocated memory is initialized to nul bytes. The realloc() function changes the size of the previously allocated memo- ry referenced by ptr to size bytes. The contents of the memory are un- changed up to the lesser of the new and old sizes. If the new size is larger, the value of the newly allocated portion of the memory is unde- fined. If the requested memory cannot be allocated, NULL is returned and the memory referenced by ptr is valid and unchanged. If ptr is NULL, the realloc() function behaves identically to malloc() for the specified size. The free() function causes the allocated memory referenced by ptr to be made available for future allocations. If ptr is NULL, no action occurs.