@Override
  public long getEstimatedMemorySize() {
    JavaDataModel jdm = JavaDataModel.get();
    long size = 0;
    size += writeBuffers.getEstimatedMemorySize();
    size += jdm.lengthForLongArrayOfSize(refs.length);
    // 11 primitive1 fields, 2 refs above with alignment
    size += JavaDataModel.alignUp(15 * jdm.primitive1(), jdm.memoryAlign());
    return size;
  }
Number of bytes used by the hashmap.
There are two main components that take most memory: writeBuffers and refs
Others include instance fields: 100
@return number of bytes
ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/BytesBytesMultiHashMap.java