Lines Matching defs:blk

311 	struct header *blk;
472 blk = freeptr;
474 blk = blk->nextfree;
476 next = blk->nextblk;
488 lastblk = blk;
489 blk->nextblk = next;
491 } while (((char *)(next) - (char *)blk) < nb);
496 if (blk == &(freeptr[1])) {
546 blk = newblk;
556 * in blk
564 lastblk = blk = arenaend;
586 blk = lastblk;
587 DELFREEQ(blk);
593 DELFREEQ(blk);
595 * make head of free queue immediately follow blk,
596 * unless blk was at the end of the queue
598 nblk = blk->nextfree;
603 /* blk now points to an adequate block */
604 if (((char *)blk->nextblk - (char *)blk) - nb >= MINBLKSZ) {
607 newblk = (struct header *)((char *)blk + nb);
608 newblk->nextblk = blk->nextblk;
610 blk->nextblk = SETBUSY(newblk);
612 /* if blk was lastblk, make newblk lastblk */
613 if (blk == lastblk)
617 blk->nextblk = SETBUSY(blk->nextblk);
621 assert((char *)CLRALL(blk->nextblk) -
622 ((char *)blk + minhead) >= nbytes);
623 assert((char *)CLRALL(blk->nextblk) -
624 ((char *)blk + minhead) < nbytes + MINBLKSZ);
625 return ((char *)blk + minhead);
654 struct holdblk *holdblk; /* block holding blk */
656 /* queue containing blk's holder */
690 struct header *blk; /* real start of block */
691 struct header *next; /* next = blk->nextblk */
694 blk = (struct header *)((char *)ptr - minhead);
695 next = blk->nextblk;
699 blk->nextblk = next = CLRBUSY(next);
700 ADDFREEQ(blk);
707 if (next == arenaend) lastblk = blk;
708 blk->nextblk = next;
739 struct header *blk; /* block ptr is contained in */
743 struct header *next; /* block after blk */
776 blk = (struct header *)((char *)ptr - minhead);
777 next = blk->nextblk;
785 DELFREEQ(blk);
786 blk->nextblk = SETBUSY(next);
789 /* make blk as big as possible */
795 blk->nextblk = SETBUSY(next);
796 if (next >= arenaend) lastblk = blk;
804 cpysize = (char *)next - (char *)blk;
814 newblk = (struct header *)((char *)blk +
817 blk->nextblk = SETBUSY(newblk);
820 /* if blk was lastblk, make newblk lastblk */
821 if (blk == lastblk)
968 struct header *blk, *next; /* ptr to ordinary blocks */
981 blk = CLRBUSY(arena[1].nextblk);
983 inf.arena = (char *)arenaend - (char *)blk;
989 next = CLRBUSY(blk->nextblk);
992 size = (char *)next - (char *)blk;
993 if (TESTBUSY(blk->nextblk)) {
999 blk = next;
1000 next = CLRBUSY(blk->nextblk);
1014 do { /* loop thru 1 hold blk chain */
1099 struct header *blk, *prev, *next; /* ptr to ordinary blocks */
1106 blk = arena + 1;
1109 blk = (struct header *)CLRALL(blk->nextblk);
1110 next = (struct header *)CLRALL(blk->nextblk);
1112 assert(blk >= arena + 1);
1113 assert(blk <= lastblk);
1114 assert(next >= blk + 1);
1115 assert(((uintptr_t)((struct header *)blk->nextblk) &
1118 if (TESTBUSY(blk->nextblk) == 0) {
1119 assert(blk->nextfree >= freeptr);
1120 assert(blk->prevfree >= freeptr);
1121 assert(blk->nextfree <= lastblk);
1122 assert(blk->prevfree <= lastblk);
1123 assert(((uintptr_t)((struct header *)blk->nextfree) &
1125 assert(((uintptr_t)((struct header *)blk->prevfree) &
1126 7) == 0 || blk->prevfree == freeptr);
1128 blk = next;
1129 next = CLRBUSY(blk->nextblk);