public void putInPool(T object) {
    if (count < buffer.length) {
      buffer[head] = object;
      ++count;
      ++head;
      if (head == buffer.length) {
        head = 0;
      }
    }
    else {
      allocator.free(object);
    }
  }
Count of available elements. They are behind the head, with wrap-around
The head itself is not free, is null
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorUtilBatchObjectPool.java