All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.asher_stern.crf.utilities.RuntimeUtilities Maven / Gradle / Ivy

Go to download

Implementation of linear-chain Conditional Random Fields (CRF) in pure Java

There is a newer version: 1.2.0
Show newest version
package com.asher_stern.crf.utilities;

/**
 * A collection of static functions for the JVM runtime.
 * 
 * @author Asher Stern
 * Date: Nov 8, 2014
 *
 */
public class RuntimeUtilities
{
	public static final long MEGA = 1048576;
	
	/**
	 * Returns a string which describes the amount of memory currently used by the JVM heap.
	 * @return a string which describes the amount of memory currently used by the JVM heap.
	 */
	public static String getUsedMemory()
	{
		final Runtime runtime = Runtime.getRuntime();
		return "Used memory: "+String.valueOf((runtime.totalMemory()-runtime.freeMemory())/MEGA)+" MB";
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy