javando
javando

Reputation: 139

How to cause a very high heap fragmentation in Java 8 HotSpot using CMS GC

I am studying Java8 HotSpot heap fragmentation (on CMS), and I'm struggling to write some code that produces high fragmentation. I've been trying with very large objects without success.

Could someone post a code that creates a very high heap fragmentation (that reaches a promotion failure), so I could study it ?

Thanks

Upvotes: 1

Views: 217

Answers (1)

Alexey Ragozin
Alexey Ragozin

Reputation: 8399

Take a look at HeapFragger by Gil Tene from Azul systems.

It is tool build to demonstrate flaws in HotSpot JVM garbage collection.

Upvotes: 2

Related Questions