public T getFromPool() throws HiveException {
    T ret = null;
    if (count == 0) {
      // Pool is exhausted, return a new object
      ret = allocator.alloc();
    }
    else {
      int tail = (head + buffer.length - count) % buffer.length;
      ret = buffer[tail];
      buffer[tail] = null;
      --count;
    }
    
    return ret;
  }
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