Lines Matching defs:hashp

82 __big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val)
111 bufp = __add_ovflpage(hashp, bufp);
167 bufp = __add_ovflpage(hashp, bufp);
191 __big_delete(HTAB *hashp, BUFHEAD *bufp)
216 rbufp = __get_buf(hashp, pageno, rbufp, 0);
218 __free_ovflpage(hashp, last_bfp);
248 FREESPACE(bp) = hashp->BSIZE - PAGE_META(n);
249 OFFSET(bp) = hashp->BSIZE;
253 __free_ovflpage(hashp, rbufp);
255 __free_ovflpage(hashp, last_bfp);
257 hashp->NKEYS--;
268 __find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size)
281 for (bytes = hashp->BSIZE - bp[ndx];
283 bytes = hashp->BSIZE - bp[ndx]) {
288 bufp = __get_buf(hashp, bp[ndx + 2], bufp, 0);
315 __find_last_page(HTAB *hashp, BUFHEAD **bpp)
336 bufp = __get_buf(hashp, pageno, bufp, 0);
354 __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current)
362 bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
370 bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
391 bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
404 hashp->cpage = NULL;
405 hashp->cbucket++;
406 hashp->cndx = 1;
408 hashp->cpage = __get_buf(hashp,
410 if (!hashp->cpage)
412 hashp->cndx = 1;
414 hashp->cpage->page)[0]) {
415 hashp->cbucket++;
416 hashp->cpage = NULL;
423 val->size = (size_t)collect_data(hashp, bufp, (int)len, set_current);
431 memmove(hashp->tmp_buf, (save_p->page) + off, len);
432 val->data = (u_char *)hashp->tmp_buf;
440 collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set)
450 mylen = hashp->BSIZE - bp[1];
455 free(hashp->tmp_buf);
456 if ((hashp->tmp_buf = (char *)malloc(totlen)) == NULL)
459 hashp->cndx = 1;
461 hashp->cpage = NULL;
462 hashp->cbucket++;
464 hashp->cpage =
465 __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
466 if (!hashp->cpage)
468 else if (!((u_int16_t *)hashp->cpage->page)[0]) {
469 hashp->cbucket++;
470 hashp->cpage = NULL;
475 xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
477 collect_data(hashp, xbp, len + mylen, set)) < 1))
484 memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], mylen);
492 __big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set)
494 key->size = (size_t)collect_key(hashp, bufp, 0, val, set);
497 key->data = (u_char *)hashp->tmp_key;
506 collect_key(HTAB *hashp, BUFHEAD *bufp, int len, DBT *val, int set)
515 mylen = hashp->BSIZE - bp[1];
520 free(hashp->tmp_key);
521 if ((hashp->tmp_key = (char *)malloc(totlen)) == NULL)
523 if (__big_return(hashp, bufp, 1, val, set))
526 xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
528 collect_key(hashp, xbp, totlen, val, set)) < 1))
535 memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], mylen);
545 __big_split(HTAB *hashp,
561 if (__big_keydata(hashp, big_keyp, &key, &val, 0))
563 change = (__call_hash(hashp, key.data, key.size) != obucket);
565 if ((ret->next_addr = __find_last_page(hashp, &big_keyp))) {
567 __get_buf(hashp, ret->next_addr, big_keyp, 0)))
627 tmpp = __add_ovflpage(hashp, big_keyp);