Skip to content

Commit

Permalink
Kill MemoryChecker with 🔥
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBab committed Nov 30, 2024
1 parent dd1dc38 commit 52051be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 82 deletions.
60 changes: 0 additions & 60 deletions src/freenet/node/MemoryChecker.java

This file was deleted.

23 changes: 1 addition & 22 deletions src/freenet/node/NodeStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ final int[] getCounts(final int[] total) {
private volatile long maxPingTime;

final Node node;
private MemoryChecker myMemoryChecker;
public final PeerManager peers;

final RandomSource hardRandom;
Expand Down Expand Up @@ -409,27 +408,7 @@ public void set(Integer val) throws InvalidConfigValueException {
// Yes it could be in seconds insteed of multiples of 0.12, but we don't want people to play with it :)
statsConfig.registerIgnoredOption("aggressiveGC");

myMemoryChecker = new MemoryChecker(node.getTicker(), aggressiveGCModificator);
statsConfig.register("memoryChecker", true, sortOrder++, true, false, "NodeStat.memCheck", "NodeStat.memCheckLong",
new BooleanCallback(){
@Override
public Boolean get() {
return myMemoryChecker.isRunning();
}

@Override
public void set(Boolean val) throws InvalidConfigValueException {
if (get().equals(val))
return;

if(val)
myMemoryChecker.start();
else
myMemoryChecker.terminate();
}
});
if(statsConfig.getBoolean("memoryChecker"))
myMemoryChecker.start();
statsConfig.registerIgnoredOption("memoryChecker");

statsConfig.register("ignoreLocalVsRemoteBandwidthLiability", false, sortOrder++, true, false, "NodeStat.ignoreLocalVsRemoteBandwidthLiability", "NodeStat.ignoreLocalVsRemoteBandwidthLiabilityLong", new BooleanCallback() {

Expand Down

0 comments on commit 52051be

Please sign in to comment.