code: private Region find(long size) {
      validate(!VALIDATING || Long.bitCount(size) == 1);
  
      Node<Region> currentNode = getRoot();
      Region currentRegion = currentNode.getPayload();
      if (currentRegion == null || (currentRegion.available() & size) == 0) {
        //no region big enough for us...
        return null;
      } else {
        while (true) {
          Region left = currentNode.getLeft().getPayload();
          if (left != null && (left.available() & size) != 0) {
            currentNode = currentNode.getLeft();
            currentRegion = currentNode.getPayload();
          } else if ((currentRegion.availableHere() & size) != 0) {
            long mask = size - 1;
            long a = (currentRegion.start() + mask) & ~mask;
            return new Region(a, a + size - 1);
          } else {
            Region right = currentNode.getRight().getPayload();
            if (right != null && (right.available() & size) != 0) {
              currentNode = currentNode.getRight();
              currentRegion = currentNode.getPayload();
            } else {
              throw new AssertionError();
            }
          }
        }
      }
    }
docs: Find a region of the given size.