Lines Matching refs:size
38 * tree (thus minimizing search time for a block of a given size).
109 * A block with a negative size, a size that is not a multiple
110 * of ALIGNSIZ, a size greater than the current extent of the
111 * heap, or a size which extends beyond the end of the heap is
115 #define badblksize(p,size)\
116 ( (size) < SMALLEST_BLK \
117 || (size) & (ALIGNSIZ-1) \
118 || (size) > heapsize() \
119 || ((char*)(p))+(size) > _ubound )
126 #define badblksize(p,size) 0
163 * check for bad block size.
166 error("insert: bad block size (%d) at %#x\n", len, newblk);
201 newhdr->size = len;
207 newblk->size = len;
440 * add the size of a length word to the request, and
504 if (allocp->size - nbytes <= SMALLEST_BLK) {
522 nblk->size = allocp->size = retblk->size - nbytes;
537 retblk->size = nbytes;
540 __mallinfo.uordbytes += retblk->size; /* bytes allocated */
561 * If the block size is invalid, return.
598 * Get node length by backing up by the size of a header.
605 nbytes = oldblk->size;
607 error("free: bad block size (%d) at %#x\n",
624 neighbor_size = neighbor->size;
702 * Decreases the size of an old block to a new size.
717 remainder->size = oldsize - newsize;
718 oldblk->size = newsize;
733 * Reallocate an old block with a new size, returning the old block
735 * contents of the old block up to min(size(old block), newsize).
790 * check location and size of the old block and its
795 oldsize = oldblk->size;
797 error("realloc: bad block size (%d) at %#x\n",
810 * space. What we do next depends on a comparison of the size
811 * of the old block and the requested new block size. To do
812 * this, first round up the new size request.
814 newsize = nbytes + ALIGNSIZ; /* add size of a length word */
822 * Next, examine the size of the old block, and compare it
823 * with the requested new size.
844 oldneighborsize = oldneighbor->size;
884 oldblk->size = oldsize;
933 uint size;
938 * the size of blocks decreases monotonically with depth in
947 while ( (size = weight(fp)) >= oldsize ) {
949 if (badblksize(freeblk,size)) {
950 error("realloc: bad block size (%d) at %#x\n",
951 size, freeblk);
990 freeneighbor = nextblk(freeblk, freeblk->size);
1038 freeblk->size -= oldsize;
1057 __mallinfo.uordbytes += freeblk->size;
1062 * subtracting the size of oldblk
1065 freeblk->size -=
1070 * setting oldblk's neighbor's size
1072 oldneighbor->size =
1103 * a multiple of the system page size.
1136 p->size = nbytes;
1161 uint size;
1169 size = NFREE_HDRS*sizeof(struct freehdr) + ALIGNSIZ;
1170 blk = (Dblk) sbrk(size);
1179 blk->size = size;
1182 _ubound = (char*) nextblk(blk,size);
1186 __mallinfo.treeoverhead += size;
1297 if (probe->size > p->size) /* child larger than parent */
1305 if (probe->size > p->size) /* child larger than parent */
1318 if ( nextblk(db, probe->size) >= pdb ) /* overlap */
1327 pdb = nextblk(pdb, p->size);
1354 int size;
1382 size = p->size;
1383 if ( (size) < SMALLEST_BLK
1384 || (size) & (ALIGNSIZ-1)
1385 || (size) > heapsize()
1386 || ((char*)(p))+(size) > _ubound ) {
1387 error("malloc_verify: bad block size (%d) at %#x\n",
1388 size, p);
1391 p = nextblk(p, size);