Lines Matching refs:b

616     struct bfhead *b;  local
660 b = poolset->freelist.ql.flink;
670 while (b != &poolset->freelist) {
671 assert(b->bh.prevfree == 0);
672 pos = buf_get_pos(b, align, hdr_size, size);
675 (b->bh.bsize < best->bh.bsize)) {
676 best = b;
679 b = b->ql.flink; /* Link to next buffer */
681 b = best;
684 while (b != &poolset->freelist) {
685 pos = buf_get_pos(b, align, hdr_size, size);
687 struct bhead *b_alloc = BH((char *)b + pos);
688 struct bhead *b_next = BH((char *)b + b->bh.bsize);
690 assert(b_next->prevfree == b->bh.bsize);
698 assert(b->ql.blink->ql.flink == b);
699 assert(b->ql.flink->ql.blink == b);
706 b->ql.blink->ql.flink = b->ql.flink;
707 b->ql.flink->ql.blink = b->ql.blink;
710 b->bh.bsize = -b->bh.bsize;
716 b_alloc->bsize = -(b->bh.bsize - pos);
718 b->bh.bsize = pos;
733 b = BFH((char *)b_alloc + size);
734 b->bh.bsize = -b_alloc->bsize - size;
735 b->bh.prevfree = 0;
736 b_alloc->bsize += b->bh.bsize;
742 b->ql.flink = &poolset->freelist;
743 b->ql.blink = poolset->freelist.ql.blink;
744 poolset->freelist.ql.blink = b;
745 b->ql.blink->ql.flink = b;
747 assert(BH((char *)b + b->bh.bsize) == b_next);
748 b_next->prevfree = b->bh.bsize;
759 b = b->ql.flink; /* Link to next buffer */
854 struct bhead *b; local
857 b = BH(buf - sizeof(struct bhead));
858 rsize = -(b->bsize);
887 struct bhead *b; local
895 b = BH(((char *) buf) - sizeof(struct bhead));
896 osize = -b->bsize;
926 struct bfhead *b, *bn; local
929 b = BFH(((char *) buf) - sizeof(struct bhead));
939 if (b->bh.bsize == 0) { /* Directly-acquired buffer? */
943 assert(b->bh.prevfree == 0);
965 if (b->bh.bsize >= 0) {
968 assert(b->bh.bsize < 0);
969 bs = -b->bh.bsize;
974 assert(BH((char *) b - b->bh.bsize)->prevfree == 0);
977 poolset->totalloc += b->bh.bsize;
983 if (b->bh.prevfree != 0) {
991 register bufsize size = b->bh.bsize;
994 assert(BH((char *) b - b->bh.prevfree)->bsize == b->bh.prevfree);
995 b = BFH(((char *) b) - b->bh.prevfree);
996 b->bh.bsize -= size;
1004 b->ql.flink = &poolset->freelist;
1005 b->ql.blink = poolset->freelist.ql.blink;
1006 poolset->freelist.ql.blink = b;
1007 b->ql.blink->ql.flink = b;
1008 b->bh.bsize = -b->bh.bsize;
1016 bn = BFH(((char *) b) + b->bh.bsize);
1027 b->bh.bsize += bn->bh.bsize;
1036 bn = BFH(((char *) b) + b->bh.bsize);
1039 V memset_unchecked(((char *) b) + sizeof(struct bfhead), 0x55,
1040 (MemSize) (b->bh.bsize - sizeof(struct bfhead)));
1047 bn->bh.prevfree = b->bh.bsize;
1057 ((bufsize) b->bh.bsize) == (pool_len - sizeof(struct bhead))) {
1059 assert(b->bh.prevfree == 0);
1060 assert(BH((char *) b + b->bh.bsize)->bsize == ESent);
1061 assert(BH((char *) b + b->bh.bsize)->prevfree == b->bh.bsize);
1063 b->ql.blink->ql.flink = b->ql.flink;
1064 b->ql.flink->ql.blink = b->ql.blink;
1066 poolset->relfcn(b);
1102 struct bfhead *b = BFH(buf); local
1131 b->bh.prevfree = 0;
1137 b->ql.flink = &poolset->freelist;
1138 b->ql.blink = poolset->freelist.ql.blink;
1139 poolset->freelist.ql.blink = b;
1140 b->ql.blink->ql.flink = b;
1151 b->bh.bsize = (bufsize) len;
1153 V memset_unchecked(((char *) b) + sizeof(struct bfhead), 0x55,
1156 bn = BH(((char *) b) + len);
1172 struct bfhead *b = poolset->freelist.ql.flink; local
1179 while (b != &poolset->freelist) {
1180 assert(b->bh.bsize > 0);
1181 *totfree += b->bh.bsize;
1182 if (b->bh.bsize > *maxfree) {
1183 *maxfree = b->bh.bsize;
1185 b = b->ql.flink; /* Link to next buffer */
1218 struct bfhead *b; local
1222 b = BFH(((char *) buf) - sizeof(struct bhead));
1223 assert(b->bh.bsize != 0);
1224 if (b->bh.bsize < 0) {
1226 bdlen = (-b->bh.bsize) - sizeof(struct bhead);
1228 bdump = (unsigned char *) (((char *) b) + sizeof(struct bfhead));
1229 bdlen = b->bh.bsize - sizeof(struct bfhead);
1280 struct bfhead *b = BFH(buf); local
1282 while (b->bh.bsize != ESent) {
1283 bufsize bs = b->bh.bsize;
1289 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1295 if ((b->ql.blink->ql.flink != b) ||
1296 (b->ql.flink->ql.blink != b)) {
1302 lerr = ((char *) b) + sizeof(struct bfhead);
1308 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1312 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1315 b = BFH(((char *) b) + bs);
1328 struct bfhead *b = BFH(buf); local
1330 while (b->bh.bsize != ESent) {
1331 bufsize bs = b->bh.bsize;
1342 if ((b->ql.blink->ql.flink != b) ||
1343 (b->ql.flink->ql.blink != b)) {
1350 lerr = ((char *) b) + sizeof(struct bfhead);
1356 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1362 b = BFH(((char *) b) + bs);