Add RamUsage to be safe
Dieser Commit ist enthalten in:
Ursprung
efaf18a4f8
Commit
85d9c87464
@ -23,6 +23,10 @@ import java.lang.management.ManagementFactory;
|
|||||||
|
|
||||||
public class RamUsage {
|
public class RamUsage {
|
||||||
|
|
||||||
|
private RamUsage() {
|
||||||
|
throw new IllegalStateException("Utility Class")
|
||||||
|
}
|
||||||
|
|
||||||
public static double getUsage() {
|
public static double getUsage() {
|
||||||
try {
|
try {
|
||||||
long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();
|
long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren