/**
* Computes the memory limits for hash table flush (spill).
*/
private void computeMemoryLimits() {
JavaDataModel model = JavaDataModel.get();
fixedHashEntrySize =
model.hashMapEntry() +
keyWrappersBatch.getKeysFixedSize() +
aggregationBatchInfo.getAggregatorsFixedSize();
MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
maxMemory = memoryMXBean.getHeapMemoryUsage().getMax();