Here you can find the source of logMemoryStats(String msg)
Parameter | Description |
---|---|
msg | Text to include in log. |
public static void logMemoryStats(String msg)
//package com.java2s; // Licensed to the Apache Software Foundation (ASF) under one or more contributor public class Main { /** Log statistics on memory to stderr. */*from w w w . j a v a 2 s. c o m*/ * @param msg Text to include in log. */ public static void logMemoryStats(String msg) { Runtime rt = Runtime.getRuntime(); System.err.println(msg + ": total=" + (rt.totalMemory() / 1024) + "KB, free=" + (rt.freeMemory() / 1024) + "KB"); } }