Home | History | Annotate | Download | only in src

Lines Matching refs:qb

297     _Cell *q, **qb;
301 if ((qb = _Aldata._Plast) == 0)
303 for (qb = &_Aldata._Head; *qb != 0;
304 qb = &(*qb)->_Next)
305 if (size <= (*qb)->_Size)
306 return (qb);
310 for (; *qb != 0; qb = &(*qb)->_Next)
311 if (size <= (*qb)->_Size)
312 return (qb);
314 for (qb = &_Aldata._Head; *qb != q;
315 qb = &(*qb)->_Next)
316 if (size <= (*qb)->_Size)
317 return (qb);
342 _Cell *q, **qb;
358 if ((qb = findmem(size)) == 0)
360 q = *qb;
365 /* remove *qb cell from free list.
368 qbsBin = GET_MEM_BIN(*qb);
371 if (0 != ((*qb)->_Next))
374 qbNextBin = GET_MEM_BIN((*qb)->_Next);
378 if (binsFirstFreeCell[qbsBin] == *qb)
382 binsFirstFreeCell[qbsBin] = (*qb)->_Next;
387 if (binsFirstFreeCell[qbsBin] == *qb)
399 if (binsFirstFreeCell[qbsBin] == *qb)
407 *qb = q->_Next;
411 *qb = (_Cell *)((char *)q + size);
412 (*qb)->_Next = q->_Next;
413 (*qb)->_Size = q->_Size - size;
416 /* remove q from free list, and add *qb to free list.
422 /* now add *qb to its bin's free list if it's the first */
423 qbsBin = GET_MEM_BIN(*qb);
424 if ((binsFirstFreeCell[qbsBin] == 0) || (*qb < binsFirstFreeCell[qbsBin]))
425 binsFirstFreeCell[qbsBin] = *qb;
428 _Aldata._Plast = qb; /* resume scan here */