Archiviert
13
0

Remove getMXBean

Dieser Commit ist enthalten in:
Lixfel 2021-01-06 12:17:00 +01:00
Ursprung a59b01f43b
Commit f7f97af2bf

Datei anzeigen

@ -287,32 +287,6 @@ public class BackgroundCompiler {
}
}
/**
* Retrieve the current usage of the Perm Gen space in percentage.
* @return Usage of the perm gen space.
*/
private double getPermGenUsage() {
Object permGenBean = this.permGenBean;
if (permGenBean == unknownPermGenBean) {
for (MemoryPoolMXBean item : ManagementFactory.getMemoryPoolMXBeans()) {
if (item.getName().contains("Perm Gen")) {
permGenBean = this.permGenBean = item;
break;
}
}
if (permGenBean == unknownPermGenBean) {
permGenBean = this.permGenBean = null;
}
}
if (permGenBean != null) {
MemoryUsage usage = ((MemoryPoolMXBean) permGenBean).getUsage();
return usage.getUsed() / (double) usage.getCommitted();
}
// Unknown
return 0;
}
/**
* Clean up after ourselves using the default timeout.
*/