boolean free(PoolSubpage<T> head, int bitmapIdx) {
        if (elemSize == 0) {
            return true;
        }
        int q = bitmapIdx >>> 6;
        int r = bitmapIdx & 63;
        assert (bitmap[q] >>> r & 1) != 0;
        bitmap[q] ^= 1L << r;

        setNextAvail(bitmapIdx);

        if (numAvail ++ == 0) {
            addToPool(head);
            return true;
        }

        if (numAvail != maxNumElems) {
            return true;
        } else {
            // Subpage not in use (numAvail == maxNumElems)
            if (prev == next) {
                // Do not remove if this subpage is the only one left in the pool.
                return true;
            }

            // Remove this subpage from the pool if there are other subpages left in the pool.
            doNotDestroy = false;
            removeFromPool();
            return false;
        }
    }
boolean free ( PoolSubpage < T > head , int bitmapIdx ) { if ( elemSize == 0 ) { return true ; } int q = bitmapIdx > > > 6 ; int r = bitmapIdx & 63 ; assert ( bitmap [ q ] > > > r & 1 ) != 0 ; bitmap [ q ] ^= 1L << r ; setNextAvail ( bitmapIdx ) ; if ( numAvail ++ == 0 ) { addToPool ( head ) ; return true ; } if ( numAvail != maxNumElems ) { return true ; } else { if ( prev == next ) { return true ; } doNotDestroy = false ; removeFromPool ( ) ; return false ; } }
@return {@code true} if this subpage is in use.
{@code false} if this subpage is not used by its chunk and thus it's OK to be released.