Lines Matching refs:bh

521     struct bhead bh;		      /* Common header */  member
528 struct bhead bh; /* Common allocated/free header */ member
586 if (bf->bh.bsize < size) in buf_get_pos()
593 buf = (unsigned long)bf + bf->bh.bsize - size + sizeof(struct bhead) + in buf_get_pos()
613 bs = b->bh.bsize; in get_free2_sum()
716 assert(b->bh.prevfree == 0);
720 (b->bh.bsize < best->bh.bsize)) {
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);
757 b->bh.bsize = -b->bh.bsize;
763 b_alloc->bsize = -(b->bh.bsize - pos);
765 b->bh.bsize = pos;
782 b->bh.bsize = -b_alloc->bsize - size;
783 b->bh.prevfree = 0;
784 b_alloc->bsize += b->bh.bsize;
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);
854 bdh->bh.bsize = 0;
855 bdh->bh.prevfree = 0;
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;
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;
1063 b->bh.bsize = -b->bh.bsize;
1064 update_free2_sum(poolset, 0, 0, b->bh.bsize);
1067 wipe_size = b->bh.bsize - sizeof(struct bfhead);
1075 bn = BFH(((char *) b) + b->bh.bsize);
1076 if (bn->bh.bsize > 0) {
1081 assert(BH((char *) bn + bn->bh.bsize)->prevfree == bn->bh.bsize);
1086 rem_sz = b->bh.bsize;
1087 rem_sz2 = bn->bh.bsize;
1088 b->bh.bsize += bn->bh.bsize;
1089 add_sz = b->bh.bsize;
1099 bn = BFH(((char *) b) + b->bh.bsize);
1106 assert(bn->bh.bsize < 0);
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);
1194 b->bh.prevfree = 0;
1214 b->bh.bsize = (bufsize) len;
1215 update_free2_sum(poolset, 0, 0, b->bh.bsize);
1244 assert(b->bh.bsize > 0);
1245 *totfree += b->bh.bsize;
1246 if (b->bh.bsize > *maxfree) {
1247 *maxfree = b->bh.bsize;
1287 assert(b->bh.bsize != 0);
1288 if (b->bh.bsize < 0) {
1290 bdlen = (-b->bh.bsize) - sizeof(struct bhead);
1293 bdlen = b->bh.bsize - sizeof(struct bfhead);
1346 while (b->bh.bsize != ESent) {
1347 bufsize bs = b->bh.bsize;
1394 while (b->bh.bsize != ESent) {
1395 bufsize bs = b->bh.bsize;
1467 .bh = { 0, 0},