log_error("%s: malloc", __func__);
event_warn("%s: malloc", __func__);
kq_insert(struct kqop *kqop, struct kevent *kev){	int nevents = kqop->nevents;	if (kqop->nchanges == nevents) {		struct kevent *newchange;		struct kevent *newresult;		nevents *= 2;		newchange = realloc(kqop->changes,				    nevents * sizeof(struct kevent));		if (newchange == NULL) {			log_error("%s: malloc", __func__);			return (-1);		}		kqop->changes = newchange;		newresult = realloc(kqop->events,				    nevents * sizeof(struct kevent));		/*		 * If we fail, we don't have to worry about freeing,		 * the next realloc will pick it up.		 */		if (newresult == NULL) {			log_error("%s: malloc", __func__);			return (-1);		}		kqop->events = newresult;		kqop->nevents = nevents;	}	memcpy(&kqop->changes[kqop->nchanges++], kev, sizeof(struct kevent));	LOG_DBG((LOG_MISC, 70, "%s: fd %d %s%s",		 __func__, kev->ident, 		 kev->filter == EVFILT_READ ? "EVFILT_READ" : "EVFILT_WRITE",		 kev->flags == EV_DELETE ? " (del)" : ""));	return (0);}