public MemoryManager(float ratio, long minAllocation) { checkRatio(ratio); memoryPoolRatio = ratio; minMemoryAllocation = minAllocation; totalMemoryPool = Math.round(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax () * ratio); LOG.debug(String.format("Allocated total memory pool is: %,d", totalMemoryPool)); }