Lines Matching defs:hashp

86 __big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val)
125 bufp = __add_ovflpage(hashp, bufp);
192 bufp = __add_ovflpage(hashp, bufp);
219 __big_delete(HTAB *hashp, BUFHEAD *bufp)
245 rbufp = __get_buf(hashp, (uint32_t)pageno, rbufp, 0);
247 __free_ovflpage(hashp, last_bfp);
277 temp = HASH_BSIZE(hashp) - PAGE_META(n);
280 OFFSET(bp) = HASH_BSIZE(hashp);
284 __free_ovflpage(hashp, rbufp);
286 __free_ovflpage(hashp, last_bfp);
288 hashp->NKEYS--;
299 __find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size)
312 for (bytes = HASH_BSIZE(hashp) - bp[ndx];
314 bytes = HASH_BSIZE(hashp) - bp[ndx]) {
319 bufp = __get_buf(hashp, (uint32_t)bp[ndx + 2], bufp, 0);
346 __find_last_page(HTAB *hashp, BUFHEAD **bpp)
367 bufp = __get_buf(hashp, (uint32_t)pageno, bufp, 0);
385 __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current)
393 bufp = __get_buf(hashp, (uint32_t)bp[bp[0] - 1], bufp, 0);
401 bufp = __get_buf(hashp, (uint32_t)bp[bp[0] - 1], bufp, 0);
422 bufp = __get_buf(hashp, (uint32_t)bp[bp[0] - 1], bufp,
436 hashp->cpage = NULL;
437 hashp->cbucket++;
438 hashp->cndx = 1;
440 hashp->cpage = __get_buf(hashp,
442 if (!hashp->cpage)
444 hashp->cndx = 1;
446 hashp->cpage->page)[0]) {
447 hashp->cbucket++;
448 hashp->cpage = NULL;
455 val->size = collect_data(hashp, bufp, (int)len, set_current);
463 memmove(hashp->tmp_buf, (save_p->page) + off, (size_t)len);
464 val->data = (uint8_t *)hashp->tmp_buf;
472 collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set)
482 mylen = HASH_BSIZE(hashp) - bp[1];
487 if (hashp->tmp_buf)
488 free(hashp->tmp_buf);
489 if ((hashp->tmp_buf = calloc(1, (size_t)totlen)) == NULL)
492 hashp->cndx = 1;
494 hashp->cpage = NULL;
495 hashp->cbucket++;
497 hashp->cpage =
498 __get_buf(hashp, (uint32_t)bp[bp[0] - 1],
500 if (!hashp->cpage)
502 else if (!((uint16_t *)(void *)hashp->cpage->page)[0]) {
503 hashp->cbucket++;
504 hashp->cpage = NULL;
509 xbp = __get_buf(hashp, (uint32_t)bp[bp[0] - 1], bufp, 0);
511 collect_data(hashp, xbp, len + mylen, set)) < 1))
518 memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], (size_t)mylen);
526 __big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set)
528 key->size = collect_key(hashp, bufp, 0, val, set);
531 key->data = (uint8_t *)hashp->tmp_key;
540 collect_key(HTAB *hashp, BUFHEAD *bufp, int len, DBT *val, int set)
549 mylen = HASH_BSIZE(hashp) - bp[1];
554 if (hashp->tmp_key != NULL)
555 free(hashp->tmp_key);
556 if ((hashp->tmp_key = calloc(1, (size_t)totlen)) == NULL)
558 if (__big_return(hashp, bufp, 1, val, set))
561 xbp = __get_buf(hashp, (uint32_t)bp[bp[0] - 1], bufp, 0);
563 collect_key(hashp, xbp, totlen, val, set)) < 1))
570 memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], (size_t)mylen);
581 HTAB *hashp,
602 if (__big_keydata(hashp, big_keyp, &key, &val, 0))
604 change = (__call_hash(hashp, key.data, (int)key.size) != obucket);
606 if ((ret->next_addr = __find_last_page(hashp, &big_keyp)) != 0) {
608 __get_buf(hashp, (uint32_t)ret->next_addr, big_keyp, 0)))
668 tmpp = __add_ovflpage(hashp, big_keyp);