Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide

Memory Concerns

This function should be called instead of the standard realloc() C function, and terminates the slapd server with an “out of memory” error message if memory cannot be allocated.

The block parameter passed to this function should be the address of a pointer that was allocated using a slapi call such as slapi_ch_malloc(),slapi_ch_calloc(), or slapi_ch_strdup().

The returned pointer should be freed by calling slapi_ch_free() .