1 /* ch_malloc.c - malloc routines that test returns from malloc and friends */
19 if ( (new = (void *) malloc( size )) == NULL ) {
20 Debug( LDAP_DEBUG_ANY, "malloc of %lu bytes failed\n", size, 0, 0 );
35 if ( block == NULL ) {
36 return( ch_malloc( size ) );
39 if ( (new = (void *) realloc( block, size )) == NULL ) {
40 Debug( LDAP_DEBUG_ANY, "realloc of %lu bytes failed\n", size, 0, 0 );
55 if ( (new = (void *) calloc( nelem, size )) == NULL ) {
56 Debug( LDAP_DEBUG_ANY, "calloc of %lu elems of %lu bytes failed\n",