private long refreshMemoryUsed() {
    long memUsed = bloom1 != null ? bloom1.sizeInBytes() : 0;
    for (HashPartition hp : hashPartitions) {
      if (hp.hashMap != null) {
        memUsed += hp.hashMap.memorySize();
      } else {
        // also include the still-in-memory sidefile, before it has been truly spilled
        if (hp.sidefileKVContainer != null) {
          memUsed += hp.sidefileKVContainer.numRowsInReadBuffer() * tableRowSize;
        }
      }
    }
    return memoryUsed = memUsed;
  }
Get the current memory usage by recalculating it.
@return current memory usage
ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java