Lines Matching refs:hashp
82 __big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) in __big_insert() argument
112 bufp = __add_ovflpage(hashp, bufp); in __big_insert()
168 bufp = __add_ovflpage(hashp, bufp); in __big_insert()
192 __big_delete(HTAB *hashp, BUFHEAD *bufp) in __big_delete() argument
217 rbufp = __get_buf(hashp, pageno, rbufp, 0); in __big_delete()
219 __free_ovflpage(hashp, last_bfp); in __big_delete()
249 FREESPACE(bp) = hashp->BSIZE - PAGE_META(n); in __big_delete()
250 OFFSET(bp) = hashp->BSIZE; in __big_delete()
254 __free_ovflpage(hashp, rbufp); in __big_delete()
256 __free_ovflpage(hashp, last_bfp); in __big_delete()
258 hashp->NKEYS--; in __big_delete()
269 __find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size) in __find_bigpair() argument
282 for (bytes = hashp->BSIZE - bp[ndx]; in __find_bigpair()
284 bytes = hashp->BSIZE - bp[ndx]) { in __find_bigpair()
289 bufp = __get_buf(hashp, bp[ndx + 2], bufp, 0); in __find_bigpair()
316 __find_last_page(HTAB *hashp, BUFHEAD **bpp) in __find_last_page() argument
337 bufp = __get_buf(hashp, pageno, bufp, 0); in __find_last_page()
355 __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current) in __big_return() argument
363 bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); in __big_return()
371 bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); in __big_return()
392 bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); in __big_return()
405 hashp->cpage = NULL; in __big_return()
406 hashp->cbucket++; in __big_return()
407 hashp->cndx = 1; in __big_return()
409 hashp->cpage = __get_buf(hashp, in __big_return()
411 if (!hashp->cpage) in __big_return()
413 hashp->cndx = 1; in __big_return()
415 hashp->cpage->page)[0]) { in __big_return()
416 hashp->cbucket++; in __big_return()
417 hashp->cpage = NULL; in __big_return()
424 val->size = (size_t)collect_data(hashp, bufp, (int)len, set_current); in __big_return()
432 memmove(hashp->tmp_buf, (save_p->page) + off, len); in __big_return()
433 val->data = (u_char *)hashp->tmp_buf; in __big_return()
441 collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set) in collect_data() argument
451 mylen = hashp->BSIZE - bp[1]; in collect_data()
456 if (hashp->tmp_buf) in collect_data()
457 free(hashp->tmp_buf); in collect_data()
458 if ((hashp->tmp_buf = (char *)malloc(totlen)) == NULL) in collect_data()
461 hashp->cndx = 1; in collect_data()
463 hashp->cpage = NULL; in collect_data()
464 hashp->cbucket++; in collect_data()
466 hashp->cpage = in collect_data()
467 __get_buf(hashp, bp[bp[0] - 1], bufp, 0); in collect_data()
468 if (!hashp->cpage) in collect_data()
470 else if (!((u_int16_t *)hashp->cpage->page)[0]) { in collect_data()
471 hashp->cbucket++; in collect_data()
472 hashp->cpage = NULL; in collect_data()
477 xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); in collect_data()
479 collect_data(hashp, xbp, len + mylen, set)) < 1)) in collect_data()
486 memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], mylen); in collect_data()
494 __big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set) in __big_keydata() argument
496 key->size = (size_t)collect_key(hashp, bufp, 0, val, set); in __big_keydata()
499 key->data = (u_char *)hashp->tmp_key; in __big_keydata()
508 collect_key(HTAB *hashp, BUFHEAD *bufp, int len, DBT *val, int set) in collect_key() argument
517 mylen = hashp->BSIZE - bp[1]; in collect_key()
522 if (hashp->tmp_key != NULL) in collect_key()
523 free(hashp->tmp_key); in collect_key()
524 if ((hashp->tmp_key = (char *)malloc(totlen)) == NULL) in collect_key()
526 if (__big_return(hashp, bufp, 1, val, set)) in collect_key()
529 xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); in collect_key()
531 collect_key(hashp, xbp, totlen, val, set)) < 1)) in collect_key()
538 memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], mylen); in collect_key()
548 __big_split(HTAB *hashp, in __big_split() argument
564 if (__big_keydata(hashp, big_keyp, &key, &val, 0)) in __big_split()
566 change = (__call_hash(hashp, key.data, key.size) != obucket); in __big_split()
568 if ( (ret->next_addr = __find_last_page(hashp, &big_keyp)) ) { in __big_split()
570 __get_buf(hashp, ret->next_addr, big_keyp, 0))) in __big_split()
630 tmpp = __add_ovflpage(hashp, big_keyp); in __big_split()