Lines Matching defs:holdblk

49 static ssize_t freespace(struct holdblk *);
132 static struct holdblk **holdhead; /* pointer to array of head pointers */
333 struct holdblk *holdblk; /* head of right sized queue */
335 struct holdblk *newhold;
355 holdhead = (struct holdblk **)
356 malloc_unlocked(sizeof (struct holdblk *) *
374 holdblk = holdhead[nb / grain];
380 if ((holdblk != HGROUND) && (holdblk->lfreeq != LGROUND)) {
382 lblk = holdblk->lfreeq;
391 * the next space. If not, mark holdblk full,
392 * and move holdblk to the end of the queue
394 if (lblk < holdblk->unused) {
395 /* move to next holdblk, if this one full */
396 if ((holdblk->lfreeq =
400 holdblk->nexthblk;
402 } else if (((char *)holdblk->unused + nb) <
403 ((char *)holdblk + HOLDSZ(nb))) {
404 holdblk->unused = (struct lblk *)
405 ((char *)holdblk->unused+nb);
406 holdblk->lfreeq = holdblk->unused;
408 holdblk->unused = (struct lblk *)
409 ((char *)holdblk->unused+nb);
410 holdblk->lfreeq = LGROUND;
412 holdblk->nexthblk;
415 lblk->header.holder = (struct holdblk *)SETALL(holdblk);
418 newhold = (struct holdblk *)
424 if (holdblk != HGROUND) {
425 newhold->nexthblk = holdblk;
426 newhold->prevhblk = holdblk->prevhblk;
427 holdblk->prevhblk = newhold;
437 lblk->header.holder = (struct holdblk *)SETALL(newhold);
441 assert(((struct holdblk *)CLRALL(lblk->header.holder))->blksz >=
654 struct holdblk *holdblk; /* block holding blk */
655 struct holdblk *oldhead; /* former head of the hold block */
668 holdblk = lblk->header.holder;
669 if (!TESTBUSY(holdblk))
671 holdblk = (struct holdblk *)CLRALL(holdblk);
673 lblk->header.nextfree = SETSMAL(holdblk->lfreeq);
674 holdblk->lfreeq = lblk;
675 /* move holdblk to head of queue, if its not already there */
676 offset = holdblk->blksz / grain;
678 if (oldhead != holdblk) {
680 holdhead[offset] = holdblk;
681 holdblk->nexthblk->prevhblk = holdblk->prevhblk;
682 holdblk->prevhblk->nexthblk = holdblk->nexthblk;
684 holdblk->nexthblk = oldhead;
685 holdblk->prevhblk = oldhead->prevhblk;
686 oldhead->prevhblk = holdblk;
687 holdblk->prevhblk->nexthblk = holdblk;
769 cpysize = ((struct holdblk *)
969 struct holdblk *hblk; /* ptr to holding blocks */
1025 inf.hblkhd = (inf.smblks / numlblks) * sizeof (struct holdblk);
1045 freespace(struct holdblk *holdblk)
1052 lblk = CLRSMAL(holdblk->lfreeq);
1053 size = holdblk->blksz + sizeof (struct lblk) - sizeof (int);
1054 unused = CLRSMAL(holdblk->unused);
1060 space += ((char *)holdblk + HOLDSZ(size)) - (char *)unused;