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

edu.berkeley.nlp.util.MemoryUtils Maven / Gradle / Ivy

Go to download

The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).

The newest version!
package edu.berkeley.nlp.util;

import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;

public class MemoryUtils {

	public static double getHeapMemoryUsed() {
		MemoryMXBean bean = ManagementFactory.getMemoryMXBean();
		MemoryUsage usage = bean.getHeapMemoryUsage();
		long bytes = usage.getUsed();  
		return bytes /1.0e6;
	}
	
	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy