Lines Matching refs:blk
311 struct header *blk; in malloc_unlocked() local
472 blk = freeptr; in malloc_unlocked()
474 blk = blk->nextfree; in malloc_unlocked()
476 next = blk->nextblk; in malloc_unlocked()
488 lastblk = blk; in malloc_unlocked()
489 blk->nextblk = next; in malloc_unlocked()
491 } while (((char *)(next) - (char *)blk) < nb); in malloc_unlocked()
496 if (blk == &(freeptr[1])) { in malloc_unlocked()
546 blk = newblk; in malloc_unlocked()
564 lastblk = blk = arenaend; in malloc_unlocked()
586 blk = lastblk; in malloc_unlocked()
587 DELFREEQ(blk); in malloc_unlocked()
593 DELFREEQ(blk); in malloc_unlocked()
598 nblk = blk->nextfree; in malloc_unlocked()
604 if (((char *)blk->nextblk - (char *)blk) - nb >= MINBLKSZ) { in malloc_unlocked()
607 newblk = (struct header *)((char *)blk + nb); in malloc_unlocked()
608 newblk->nextblk = blk->nextblk; in malloc_unlocked()
610 blk->nextblk = SETBUSY(newblk); in malloc_unlocked()
613 if (blk == lastblk) in malloc_unlocked()
617 blk->nextblk = SETBUSY(blk->nextblk); in malloc_unlocked()
621 assert((char *)CLRALL(blk->nextblk) - in malloc_unlocked()
622 ((char *)blk + minhead) >= nbytes); in malloc_unlocked()
623 assert((char *)CLRALL(blk->nextblk) - in malloc_unlocked()
624 ((char *)blk + minhead) < nbytes + MINBLKSZ); in malloc_unlocked()
625 return ((char *)blk + minhead); in malloc_unlocked()
690 struct header *blk; /* real start of block */ in free_unlocked() local
694 blk = (struct header *)((char *)ptr - minhead); in free_unlocked()
695 next = blk->nextblk; in free_unlocked()
699 blk->nextblk = next = CLRBUSY(next); in free_unlocked()
700 ADDFREEQ(blk); in free_unlocked()
707 if (next == arenaend) lastblk = blk; in free_unlocked()
708 blk->nextblk = next; in free_unlocked()
739 struct header *blk; /* block ptr is contained in */ in realloc_unlocked() local
776 blk = (struct header *)((char *)ptr - minhead); in realloc_unlocked()
777 next = blk->nextblk; in realloc_unlocked()
785 DELFREEQ(blk); in realloc_unlocked()
786 blk->nextblk = SETBUSY(next); in realloc_unlocked()
795 blk->nextblk = SETBUSY(next); in realloc_unlocked()
796 if (next >= arenaend) lastblk = blk; in realloc_unlocked()
804 cpysize = (char *)next - (char *)blk; in realloc_unlocked()
814 newblk = (struct header *)((char *)blk + in realloc_unlocked()
817 blk->nextblk = SETBUSY(newblk); in realloc_unlocked()
821 if (blk == lastblk) in realloc_unlocked()
968 struct header *blk, *next; /* ptr to ordinary blocks */ in mallinfo() local
981 blk = CLRBUSY(arena[1].nextblk); in mallinfo()
983 inf.arena = (char *)arenaend - (char *)blk; in mallinfo()
989 next = CLRBUSY(blk->nextblk); in mallinfo()
992 size = (char *)next - (char *)blk; in mallinfo()
993 if (TESTBUSY(blk->nextblk)) { in mallinfo()
999 blk = next; in mallinfo()
1000 next = CLRBUSY(blk->nextblk); in mallinfo()
1099 struct header *blk, *prev, *next; /* ptr to ordinary blocks */ in check_arena() local
1106 blk = arena + 1; in check_arena()
1109 blk = (struct header *)CLRALL(blk->nextblk); in check_arena()
1110 next = (struct header *)CLRALL(blk->nextblk); in check_arena()
1112 assert(blk >= arena + 1); in check_arena()
1113 assert(blk <= lastblk); in check_arena()
1114 assert(next >= blk + 1); in check_arena()
1115 assert(((uintptr_t)((struct header *)blk->nextblk) & in check_arena()
1118 if (TESTBUSY(blk->nextblk) == 0) { in check_arena()
1119 assert(blk->nextfree >= freeptr); in check_arena()
1120 assert(blk->prevfree >= freeptr); in check_arena()
1121 assert(blk->nextfree <= lastblk); in check_arena()
1122 assert(blk->prevfree <= lastblk); in check_arena()
1123 assert(((uintptr_t)((struct header *)blk->nextfree) & in check_arena()
1125 assert(((uintptr_t)((struct header *)blk->prevfree) & in check_arena()
1126 7) == 0 || blk->prevfree == freeptr); in check_arena()
1128 blk = next; in check_arena()
1129 next = CLRBUSY(blk->nextblk); in check_arena()