question: public static String memoryUsage ( ) { final Runtime runtime = Runtime . getRuntime ( ) ; runtime . gc ( ) ; final long max = runtime . maxMemory ( ) ; final long total = runtime . totalMemory ( ) ; final long free = runtime . freeMemory ( ) ; final long used = total - free ; return String . format ( "%d\t%d\t%d\t%d" , max , total , free , used ) ; }
target:  Calculates the memory usage according to Runtime.