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;
758 b = b->ql.flink; /* Link to next buffer */
852 struct bhead *b; local
855 b = BH(buf - sizeof(struct bhead));
856 rsize = -(b->bsize);
885 struct bhead *b; local
893 b = BH(((char *) buf) - sizeof(struct bhead));
894 osize = -b->bsize;
924 struct bfhead *b, *bn; local
928 b = BFH(((char *) buf) - sizeof(struct bhead));
938 if (b->bh.bsize == 0) { /* Directly-acquired buffer? */
942 assert(b->bh.prevfree == 0);
962 if (b->bh.bsize >= 0) {
965 assert(b->bh.bsize < 0);
970 assert(BH((char *) b - b->bh.bsize)->prevfree == 0);
973 poolset->totalloc += b->bh.bsize;
979 if (b->bh.prevfree != 0) {
987 register bufsize size = b->bh.bsize;
990 wipe_start = (char *)b;
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;
1010 wipe_start = (char *)b + sizeof(struct bfhead);
1011 wipe_size = b->bh.bsize - sizeof(struct bfhead);
1019 bn = BFH(((char *) b) + b->bh.bsize);
1030 b->bh.bsize += bn->bh.bsize;
1039 bn = BFH(((char *) b) + b->bh.bsize);
1051 bn->bh.prevfree = b->bh.bsize;
1061 ((bufsize) b->bh.bsize) == (pool_len - sizeof(struct bhead))) {
1063 assert(b->bh.prevfree == 0);
1064 assert(BH((char *) b + b->bh.bsize)->bsize == ESent);
1065 assert(BH((char *) b + b->bh.bsize)->prevfree == b->bh.bsize);
1067 b->ql.blink->ql.flink = b->ql.flink;
1068 b->ql.flink->ql.blink = b->ql.blink;
1070 poolset->relfcn(b);
1105 struct bfhead *b = BFH(buf); local
1134 b->bh.prevfree = 0;
1140 b->ql.flink = &poolset->freelist;
1141 b->ql.blink = poolset->freelist.ql.blink;
1142 poolset->freelist.ql.blink = b;
1143 b->ql.blink->ql.flink = b;
1154 b->bh.bsize = (bufsize) len;
1156 V memset_unchecked(((char *) b) + sizeof(struct bfhead), 0x55,
1159 bn = BH(((char *) b) + len);
1175 struct bfhead *b = poolset->freelist.ql.flink; local
1182 while (b != &poolset->freelist) {
1183 assert(b->bh.bsize > 0);
1184 *totfree += b->bh.bsize;
1185 if (b->bh.bsize > *maxfree) {
1186 *maxfree = b->bh.bsize;
1188 b = b->ql.flink; /* Link to next buffer */
1221 struct bfhead *b; local
1225 b = BFH(((char *) buf) - sizeof(struct bhead));
1226 assert(b->bh.bsize != 0);
1227 if (b->bh.bsize < 0) {
1229 bdlen = (-b->bh.bsize) - sizeof(struct bhead);
1231 bdump = (unsigned char *) (((char *) b) + sizeof(struct bfhead));
1232 bdlen = b->bh.bsize - sizeof(struct bfhead);
1283 struct bfhead *b = BFH(buf); local
1285 while (b->bh.bsize != ESent) {
1286 bufsize bs = b->bh.bsize;
1292 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1298 if ((b->ql.blink->ql.flink != b) ||
1299 (b->ql.flink->ql.blink != b)) {
1305 lerr = ((char *) b) + sizeof(struct bfhead);
1311 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1315 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1318 b = BFH(((char *) b) + bs);
1331 struct bfhead *b = BFH(buf); local
1333 while (b->bh.bsize != ESent) {
1334 bufsize bs = b->bh.bsize;
1345 if ((b->ql.blink->ql.flink != b) ||
1346 (b->ql.flink->ql.blink != b)) {
1353 lerr = ((char *) b) + sizeof(struct bfhead);
1359 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1365 b = BFH(((char *) b) + bs);