Lines Matching refs:b

608 	struct bfhead *b = poolset->freelist.ql.flink;  in get_free2_sum()  local
612 while (b != &poolset->freelist) { in get_free2_sum()
613 bs = b->bh.bsize; in get_free2_sum()
615 b = b->ql.flink; /* Link to next buffer */ in get_free2_sum()
661 struct bfhead *b; local
705 b = poolset->freelist.ql.flink;
715 while (b != &poolset->freelist) {
716 assert(b->bh.prevfree == 0);
717 pos = buf_get_pos(b, align, hdr_size, size);
720 (b->bh.bsize < best->bh.bsize)) {
721 best = b;
724 b = b->ql.flink; /* Link to next buffer */
726 b = best;
729 while (b != &poolset->freelist) {
730 pos = buf_get_pos(b, align, hdr_size, size);
732 struct bhead *b_alloc = BH((char *)b + pos);
733 struct bhead *b_next = BH((char *)b + b->bh.bsize);
734 bufsize rem_sz = b->bh.bsize;
737 assert(b_next->prevfree == b->bh.bsize);
745 assert(b->ql.blink->ql.flink == b);
746 assert(b->ql.flink->ql.blink == b);
753 b->ql.blink->ql.flink = b->ql.flink;
754 b->ql.flink->ql.blink = b->ql.blink;
757 b->bh.bsize = -b->bh.bsize;
763 b_alloc->bsize = -(b->bh.bsize - pos);
765 b->bh.bsize = pos;
781 b = BFH((char *)b_alloc + size);
782 b->bh.bsize = -b_alloc->bsize - size;
783 b->bh.prevfree = 0;
784 b_alloc->bsize += b->bh.bsize;
790 b->ql.flink = &poolset->freelist;
791 b->ql.blink = poolset->freelist.ql.blink;
792 poolset->freelist.ql.blink = b;
793 b->ql.blink->ql.flink = b;
795 assert(BH((char *)b + b->bh.bsize) == b_next);
796 b_next->prevfree = b->bh.bsize;
797 update_free2_sum(poolset, 0, 0, b->bh.bsize);
807 b = b->ql.flink; /* Link to next buffer */
901 struct bhead *b; local
904 b = BH(buf - sizeof(struct bhead));
905 rsize = -(b->bsize);
934 struct bhead *b; local
942 b = BH(((char *) buf) - sizeof(struct bhead));
943 osize = -b->bsize;
973 struct bfhead *b, *bn; local
980 b = BFH(((char *) buf) - sizeof(struct bhead));
990 if (b->bh.bsize == 0) { /* Directly-acquired buffer? */
994 assert(b->bh.prevfree == 0);
1014 if (b->bh.bsize >= 0) {
1017 assert(b->bh.bsize < 0);
1022 assert(BH((char *) b - b->bh.bsize)->prevfree == 0);
1025 poolset->totalloc += b->bh.bsize;
1031 if (b->bh.prevfree != 0) {
1039 register bufsize size = b->bh.bsize;
1042 wipe_start = (char *)b;
1046 assert(BH((char *) b - b->bh.prevfree)->bsize == b->bh.prevfree);
1047 b = BFH(((char *) b) - b->bh.prevfree);
1048 rem_sz = b->bh.bsize;
1049 b->bh.bsize -= size;
1050 add_sz = b->bh.bsize;
1059 b->ql.flink = &poolset->freelist;
1060 b->ql.blink = poolset->freelist.ql.blink;
1061 poolset->freelist.ql.blink = b;
1062 b->ql.blink->ql.flink = b;
1063 b->bh.bsize = -b->bh.bsize;
1064 update_free2_sum(poolset, 0, 0, b->bh.bsize);
1066 wipe_start = (char *)b + sizeof(struct bfhead);
1067 wipe_size = b->bh.bsize - sizeof(struct bfhead);
1075 bn = BFH(((char *) b) + b->bh.bsize);
1086 rem_sz = b->bh.bsize;
1088 b->bh.bsize += bn->bh.bsize;
1089 add_sz = b->bh.bsize;
1099 bn = BFH(((char *) b) + b->bh.bsize);
1111 bn->bh.prevfree = b->bh.bsize;
1121 ((bufsize) b->bh.bsize) == (pool_len - sizeof(struct bhead))) {
1123 assert(b->bh.prevfree == 0);
1124 assert(BH((char *) b + b->bh.bsize)->bsize == ESent);
1125 assert(BH((char *) b + b->bh.bsize)->prevfree == b->bh.bsize);
1127 b->ql.blink->ql.flink = b->ql.flink;
1128 b->ql.flink->ql.blink = b->ql.blink;
1130 poolset->relfcn(b);
1165 struct bfhead *b = BFH(buf); local
1194 b->bh.prevfree = 0;
1200 b->ql.flink = &poolset->freelist;
1201 b->ql.blink = poolset->freelist.ql.blink;
1202 poolset->freelist.ql.blink = b;
1203 b->ql.blink->ql.flink = b;
1214 b->bh.bsize = (bufsize) len;
1215 update_free2_sum(poolset, 0, 0, b->bh.bsize);
1217 V memset_unchecked(((char *) b) + sizeof(struct bfhead), 0x55,
1220 bn = BH(((char *) b) + len);
1236 struct bfhead *b = poolset->freelist.ql.flink; local
1243 while (b != &poolset->freelist) {
1244 assert(b->bh.bsize > 0);
1245 *totfree += b->bh.bsize;
1246 if (b->bh.bsize > *maxfree) {
1247 *maxfree = b->bh.bsize;
1249 b = b->ql.flink; /* Link to next buffer */
1282 struct bfhead *b; local
1286 b = BFH(((char *) buf) - sizeof(struct bhead));
1287 assert(b->bh.bsize != 0);
1288 if (b->bh.bsize < 0) {
1290 bdlen = (-b->bh.bsize) - sizeof(struct bhead);
1292 bdump = (unsigned char *) (((char *) b) + sizeof(struct bfhead));
1293 bdlen = b->bh.bsize - sizeof(struct bfhead);
1344 struct bfhead *b = BFH(buf); local
1346 while (b->bh.bsize != ESent) {
1347 bufsize bs = b->bh.bsize;
1353 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1359 if ((b->ql.blink->ql.flink != b) ||
1360 (b->ql.flink->ql.blink != b)) {
1366 lerr = ((char *) b) + sizeof(struct bfhead);
1372 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1376 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1379 b = BFH(((char *) b) + bs);
1392 struct bfhead *b = BFH(buf); local
1394 while (b->bh.bsize != ESent) {
1395 bufsize bs = b->bh.bsize;
1406 if ((b->ql.blink->ql.flink != b) ||
1407 (b->ql.flink->ql.blink != b)) {
1414 lerr = ((char *) b) + sizeof(struct bfhead);
1420 bufdump((void *) (((char *) b) + sizeof(struct bhead)));
1426 b = BFH(((char *) b) + bs);