Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielThomas committed Oct 25, 2023
1 parent 6ed0fb4 commit 09769e2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import java.lang.management.MemoryManagerMXBean;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

/**
* A {@link ArraySegmentRecycler} that chooses the appropriate recycler based on the garbage collector in use.
Expand All @@ -27,7 +25,7 @@ public GarbageCollectorAwareRecycler(int log2OfByteSegmentSize, int log2OfLongSe
boolean isLowPause = ManagementFactory.getGarbageCollectorMXBeans()
.stream()
.map(MemoryManagerMXBean::getName)
.map(name -> name.split(" ")[0])
.map(name -> name.split(" ")[0]) // In the form '<GC> <Phase>', for instance 'PS Scavenge' or 'ZGC Major Pauses'
.distinct()
.findFirst()
.map(LOW_PAUSE_COLLECTORS::contains)
Expand Down

0 comments on commit 09769e2

Please sign in to comment.