Lines Matching refs:bcp

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