Package com.helix.experiments.gc
Class GcStressExperiment
java.lang.Object
com.helix.experiments.gc.GcStressExperiment
Experiment evaluating GC behavior with SoftReferences under memory pressure
vs immediate GC collection of WeakReferences.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsoftReferenceUnderPressure(int objectCount, boolean simulateHighPressure) Tests SoftReference behavior under memory pressure: Soft references are retained until heap pressure demands reclamation.weakReferenceImmediate(int objectCount) Tests WeakReference lifecycle: Weak references are reclaimed immediately during any GC pass.
-
Constructor Details
-
GcStressExperiment
public GcStressExperiment()
-
-
Method Details
-
weakReferenceImmediate
Tests WeakReference lifecycle: Weak references are reclaimed immediately during any GC pass. -
softReferenceUnderPressure
Tests SoftReference behavior under memory pressure: Soft references are retained until heap pressure demands reclamation.
-