@Override
  public long markForEviction() {
    long oldValue, newValue;
    do {
      oldValue = state.get();
      if (State.hasFlags(oldValue, State.FLAG_EVICTED | State.FLAG_MARKED)) {
        // Either got evicted concurrently, or was marked by another event already (should be very rare),
        // nothing to do now.
        return 0;
      }
      newValue = State.setFlag(oldValue, State.FLAG_MARKED);
    } while (!state.compareAndSet(oldValue, newValue));
    return getMemoryUsage();
  }
Marks this buffer as eligible for proactive eviction. No need to check refCount here.
@return buffer size
llap-server/src/java/org/apache/hadoop/hive/llap/cache/LlapAllocatorBuffer.java