ccdbufsizeof = sizeof(struct ccdbuf) + (CCD_SGMAX - 1) * sizeof(struct ccdseg); pool_init(&ccdbufpl, ccdbufsizeof, 0, 0, 0, "ccdbufpl", NULL); pool_setlowat(&ccdbufpl, 16); pool_sethiwat(&ccdbufpl, 1024);
ccdattach(num)	int num;{	if (num <= 0) {#ifdef DIAGNOSTIC		panic("ccdattach: count <= 0");#endif		return;	}	ccd_softc = (struct ccd_softc *)malloc(num * sizeof(struct ccd_softc),	    M_DEVBUF, M_NOWAIT);	ccddevs = (struct ccddevice *)malloc(num * sizeof(struct ccddevice),	    M_DEVBUF, M_NOWAIT);	if ((ccd_softc == NULL) || (ccddevs == NULL)) {		printf("WARNING: no memory for concatenated disks\n");		if (ccd_softc != NULL)			free(ccd_softc, M_DEVBUF);		if (ccddevs != NULL)			free(ccddevs, M_DEVBUF);		return;	}	numccd = num;	bzero(ccd_softc, num * sizeof(struct ccd_softc));	bzero(ccddevs, num * sizeof(struct ccddevice));}