move_bytes = MIN(space, val_size);
move_bytes = PR_MIN(space, val_size);
__big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val){	register uint16 *p;	uint key_size, n, val_size;	uint16 space, move_bytes, off;	char *cp, *key_data, *val_data;	cp = bufp->page;		/* Character pointer of p. */	p = (uint16 *)cp;	key_data = (char *)key->data;	key_size = key->size;	val_data = (char *)val->data;	val_size = val->size;	/* First move the Key */	for (space = FREESPACE(p) - BIGOVERHEAD; key_size;	    space = FREESPACE(p) - BIGOVERHEAD) {		move_bytes = MIN(space, key_size);		off = OFFSET(p) - move_bytes;		memmove(cp + off, key_data, move_bytes);		key_size -= move_bytes;		key_data += move_bytes;		n = p[0];		p[++n] = off;		p[0] = ++n;		FREESPACE(p) = off - PAGE_META(n);		OFFSET(p) = off;		p[n] = PARTIAL_KEY;		bufp = __add_ovflpage(hashp, bufp);		if (!bufp)			return (-1);		n = p[0];		if (!key_size) {			if (FREESPACE(p)) {				move_bytes = MIN(FREESPACE(p), val_size);				off = OFFSET(p) - move_bytes;				p[n] = off;				memmove(cp + off, val_data, move_bytes);				val_data += move_bytes;				val_size -= move_bytes;				p[n - 2] = FULL_KEY_DATA;				FREESPACE(p) = FREESPACE(p) - move_bytes;				OFFSET(p) = off;			} else				p[n - 2] = FULL_KEY;		}		p = (uint16 *)bufp->page;		cp = bufp->page;		bufp->flags |= BUF_MOD;	}	/* Now move the data */	for (space = FREESPACE(p) - BIGOVERHEAD; val_size;	    space = FREESPACE(p) - BIGOVERHEAD) {		move_bytes = MIN(space, val_size);		/*		 * Here's the hack to make sure that if the data ends on the		 * same page as the key ends, FREESPACE is at least one.		 */		if (space == val_size && val_size == val->size)			move_bytes--;		off = OFFSET(p) - move_bytes;		memmove(cp + off, val_data, move_bytes);		val_size -= move_bytes;		val_data += move_bytes;		n = p[0];		p[++n] = off;		p[0] = ++n;		FREESPACE(p) = off - PAGE_META(n);		OFFSET(p) = off;		if (val_size) {			p[n] = FULL_KEY;			bufp = __add_ovflpage(hashp, bufp);			if (!bufp)				return (-1);			cp = bufp->page;			p = (uint16 *)cp;		} else			p[n] = FULL_KEY_DATA;		bufp->flags |= BUF_MOD;	}	return (0);}