code: public static BitArray allocate(long bits) {
      if (!(bits > 0 & (bits & (bits - 1)) == 0))
        throw new IllegalArgumentException("size must be a power of 2");
      return new BitArray(UnsafeHeapBytes.allocate(Math.max(bits / 8 + 8, 8)), bits);
    }
docs: Allocates a new direct bit set.
  
  @param bits The number of bits in the bit set.
  @return The allocated bit set.