public Memory(RuntimeInfo runtime) { maxMemory = runtime.getMaxHeapSizeBytes(); totalMemory = runtime.getTotalHeapSizeBytes(); freeMemory = runtime.getFreeHeapSizeBytes(); usedMemory = totalMemory - freeMemory; directMemory = runtime.getDirectMemorySizeBytes(); }
"Starting up with processors[%,d], memory[%,d], maxMemory[%,d], directMemory[%,d].", JvmUtils.getRuntimeInfo().getAvailableProcessors(), JvmUtils.getRuntimeInfo().getTotalHeapSizeBytes(), JvmUtils.getRuntimeInfo().getMaxHeapSizeBytes(), JvmUtils.getRuntimeInfo().getDirectMemorySizeBytes()