Lines Matching defs:bcp
1076 umem_bufctl_t *bcp = NULL;
1112 for (bcp = *UMEM_HASH(cp, buf); bcp; bcp = bcp->bc_next)
1113 if (bcp->bc_addr == buf)
1116 if (bcp == NULL && btp != NULL)
1117 bcp = btp->bt_bufctl;
1118 if (umem_findslab(cp->cache_bufctl_cache, bcp) ==
1119 NULL || P2PHASE((uintptr_t)bcp, UMEM_ALIGN) ||
1120 bcp->bc_addr != buf) {
1122 bcp = NULL;
1133 umem_abort_info.ump_bufctl = bcp;
1164 umem_printf("bcp ^ bxstat = %lx, should be %lx\n",
1193 bufarg, (void *)bcp, cparg->cache_name);
1195 if (bcp != NULL && (cp->cache_flags & UMF_AUDIT) &&
1200 umem_bufctl_audit_t *bcap = (umem_bufctl_audit_t *)bcp;
1367 #define UMEM_AUDIT(lp, cp, bcp) \
1369 umem_bufctl_audit_t *_bcp = (umem_bufctl_audit_t *)(bcp); \
1382 umem_bufctl_audit_t *bcp;
1383 UMEM_LOCAL_BUFCTL_AUDIT(&bcp);
1385 bzero(bcp, UMEM_BUFCTL_AUDIT_SIZE);
1386 bcp->bc_addr = addr;
1387 bcp->bc_slab = sp;
1388 bcp->bc_cache = cp;
1389 UMEM_AUDIT(lp, cp, bcp);
1404 umem_bufctl_t *bcp;
1441 bcp = _umem_cache_alloc(cp->cache_bufctl_cache, umflag);
1442 if (bcp == NULL)
1446 (umem_bufctl_audit_t *)bcp;
1450 bcp->bc_addr = buf;
1451 bcp->bc_slab = sp;
1453 bcp = UMEM_BUFCTL(cp, buf);
1458 btp->bt_bufctl = bcp;
1459 btp->bt_bxstat = (intptr_t)bcp ^ UMEM_BUFTAG_FREE;
1465 bcp->bc_next = sp->slab_head;
1466 sp->slab_head = bcp;
1476 while ((bcp = sp->slab_head) != NULL) {
1477 sp->slab_head = bcp->bc_next;
1478 _umem_cache_free(cp->cache_bufctl_cache, bcp);
1504 umem_bufctl_t *bcp;
1505 while ((bcp = sp->slab_head) != NULL) {
1506 sp->slab_head = bcp->bc_next;
1507 _umem_cache_free(cp->cache_bufctl_cache, bcp);
1520 umem_bufctl_t *bcp, **hash_bucket;
1555 bcp = sp->slab_head;
1556 if ((sp->slab_head = bcp->bc_next) == NULL) {
1565 buf = bcp->bc_addr;
1567 bcp->bc_next = *hash_bucket;
1568 *hash_bucket = bcp;
1570 UMEM_AUDIT(umem_transaction_log, cp, bcp);
1573 buf = UMEM_BUF(cp, bcp);
1590 umem_bufctl_t *bcp, **prev_bcpp;
1602 while ((bcp = *prev_bcpp) != NULL) {
1603 if (bcp->bc_addr == buf) {
1604 *prev_bcpp = bcp->bc_next;
1605 sp = bcp->bc_slab;
1609 prev_bcpp = &bcp->bc_next;
1612 bcp = UMEM_BUFCTL(cp, buf);
1616 if (bcp == NULL || sp->slab_cache != cp || !UMEM_SLAB_MEMBER(sp, buf)) {
1624 ((umem_bufctl_audit_t *)bcp)->bc_contents =
1627 UMEM_AUDIT(umem_transaction_log, cp, bcp);
1645 bcp->bc_next = sp->slab_head;
1646 sp->slab_head = bcp;
1671 umem_bufctl_audit_t *bcp = (umem_bufctl_audit_t *)btp->bt_bufctl;
1675 if (btp->bt_bxstat != ((intptr_t)bcp ^ UMEM_BUFTAG_FREE)) {
1680 btp->bt_bxstat = (intptr_t)bcp ^ UMEM_BUFTAG_ALLOC;
1682 if ((cp->cache_flags & UMF_HASH) && bcp->bc_addr != buf) {
1713 btp->bt_bxstat = (intptr_t)bcp ^ UMEM_BUFTAG_FREE;
1720 UMEM_AUDIT(umem_transaction_log, cp, bcp);
1730 umem_bufctl_audit_t *bcp = (umem_bufctl_audit_t *)btp->bt_bufctl;
1733 if (btp->bt_bxstat != ((intptr_t)bcp ^ UMEM_BUFTAG_ALLOC)) {
1734 if (btp->bt_bxstat == ((intptr_t)bcp ^ UMEM_BUFTAG_FREE)) {
1746 btp->bt_bxstat = (intptr_t)bcp ^ UMEM_BUFTAG_FREE;
1748 if ((cp->cache_flags & UMF_HASH) && bcp->bc_addr != buf) {
1760 bcp->bc_contents = umem_log_enter(umem_content_log,
1762 UMEM_AUDIT(umem_transaction_log, cp, bcp);
2412 umem_bufctl_t **old_table, **new_table, *bcp;
2440 bcp = old_table[h];
2441 while (bcp != NULL) {
2442 void *addr = bcp->bc_addr;
2443 umem_bufctl_t *next_bcp = bcp->bc_next;
2445 bcp->bc_next = *hash_bucket;
2446 *hash_bucket = bcp;
2447 bcp = next_bcp;