The latest release of Java, version 11, comes with a passive GC that takes care of memory allocation. The passive nature of this GC, named the Epsilon GC, indicates that it does not perform garbage collection; rather, it continues to allocate memory until there is no room left on the heap. At that point, the JVM shuts down.
To enable the Epsilon GC, we use either of the following:
- -XX:+UseEpsilonGC
- -XX:+UseNoGC
The use of Epsilon GC is mostly seen in testing and it's low-overhead, due to the lack of garbage collection, improves testing efficiency.