FreeBSD/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
/*
 * A safe form of malloc() which will die if the allocation fails.
 */
A safe form of malloc() which will die if the allocation fails.
A safe form of malloc () which will die if the allocation fails .
void *
zfs_alloc(libzfs_handle_t *hdl, size_t size)
{
	void *data;
	if ((data = calloc(1, size)) == NULL)
		(void) no_memory(hdl);
	return (data);
}
void * zfs_alloc ( libzfs_handle_t * hdl , size_t size ) { void * data ; if ( ( data = calloc ( 1 , size ) ) == NULL ) ( void ) no_memory ( hdl ) ; return ( data ) ; }
A safe form of malloc() which will die if the allocation fails.
A safe form of malloc () which will die if the allocation fails .