if ((1<<(bits)) <= l+l) {
if ((1UL<<(bits)) <= l+l) {
malloc_make_chunks(bits)    int bits;{    struct  pginfo *bp;    void *pp;    int i, k, l;    /* Allocate a new bucket */    pp = malloc_pages(malloc_pagesize);    if (!pp)	return 0;    /* Find length of admin structure */    l = sizeof *bp - sizeof(u_long);    l += sizeof(u_long) *	(((malloc_pagesize >> bits)+MALLOC_BITS-1) / MALLOC_BITS);    /* Don't waste more than two chunks on this */    if ((1<<(bits)) <= l+l) {	bp = (struct  pginfo *)pp;    } else {	bp = (struct  pginfo *)imalloc(l);	if (!bp)	    return 0;    }    bp->size = (1<<bits);    bp->shift = bits;    bp->total = bp->free = malloc_pagesize >> bits;    bp->page = pp;    page_dir[ptr2index(pp)] = bp;    bp->next = page_dir[bits];    page_dir[bits] = bp;    /* set all valid bits in the bits */    k = bp->total;    i = 0;    /* Do a bunch at a time */    for(;k-i >= MALLOC_BITS; i += MALLOC_BITS)	bp->bits[i / MALLOC_BITS] = (u_long)~0;    for(; i < k; i++)	set_bit(bp, i);    if (bp == bp->page) {	/* Mark the ones we stole for ourselves */	for(i=0;l > 0;i++) {	    clr_bit(bp, i);	    bp->free--;	    bp->total--;	    l -= (1 << bits);	}    }    return 1;}