1 /* ch_malloc.c - malloc routines that test returns from malloc and friends */
7 #include <sys/socket.h>
17 if ( (new = (char *) malloc( size )) == NULL ) {
18 Debug( LDAP_DEBUG_ANY, "malloc of %d bytes failed\n", size, 0, 0 );
33 if ( block == NULL ) {
34 return( ch_malloc( size ) );
37 if ( (new = (char *) realloc( block, size )) == NULL ) {
38 Debug( LDAP_DEBUG_ANY, "realloc of %d bytes failed\n", size, 0, 0 );
53 if ( (new = (char *) calloc( nelem, size )) == NULL ) {
54 Debug( LDAP_DEBUG_ANY, "calloc of %d elems of %d bytes failed\n",