It is optimized for low memory footprint and small Java heap sizes. The Serial GC is the default GC in both GraalVM Community and Enterprise Edition.When the heap becomes full, a garbage collection is triggered to reclaim memory of objects that are no longer used.įor managing the Java heap, Native Image provides different garbage collector (GC) implementations:
The Java heap is created when the native image starts up, and may increase or decrease in size while the native image runs. Java objects that a native image allocates at run time reside in the area called “the Java heap”. That runtime includes all necessary components, and one of them is the memory management. A native image, when being executed, does not run on the Java HotSpot VM but on the runtime system provided with GraalVM.