From 7f7ce4bc72d2ab2610f5f7f7788a8b4ce2b1e779 Mon Sep 17 00:00:00 2001 From: Christian Wirth Date: Thu, 2 Nov 2023 10:38:20 +0100 Subject: [PATCH 1/2] minor clarification what is meant with jit-compiled code --- docs/reference-manual/native-image/MemoryManagement.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference-manual/native-image/MemoryManagement.md b/docs/reference-manual/native-image/MemoryManagement.md index 35f2351c1c5e..76735d0549ff 100644 --- a/docs/reference-manual/native-image/MemoryManagement.md +++ b/docs/reference-manual/native-image/MemoryManagement.md @@ -42,7 +42,7 @@ The exact values may depend on the system configuration and the used GC. * The *maximum Java heap size* defines the upper limit for the size of the whole Java heap. If the Java heap is full and the GC is unable reclaim sufficient memory for a Java object allocation, the allocation will fail with the `OutOfMemoryError`. -Note: The maximum heap size is only the upper limit for the Java heap and not necessarily the upper limit for the total amount of consumed memory, as Native Image places some data such as thread stacks, just-in-time compiled code, and internal data structures in memory that is separate from the Java heap. +Note: The maximum heap size is only the upper limit for the Java heap and not necessarily the upper limit for the total amount of consumed memory, as Native Image places some data such as thread stacks, just-in-time compiled code (for Truffle runtime compilation), and internal data structures in memory that is separate from the Java heap. * The *minimum Java heap size* defines how much memory the GC may always assume as reserved for the Java heap, no matter how little of that memory is actually used. * The *young generation size* determines the amount of Java memory that can be allocated without triggering a garbage collection. @@ -234,4 +234,4 @@ Which data is printed in detail depends on the used GC. ### Further Reading -* [Memory Configuration for Native Image Build](BuildConfiguration.md#memory-configuration-for-native-image-build) \ No newline at end of file +* [Memory Configuration for Native Image Build](BuildConfiguration.md#memory-configuration-for-native-image-build) From fc1c8c0c0ebb893bb8c32f5ccc674631c2e53af8 Mon Sep 17 00:00:00 2001 From: Christian Wirth Date: Thu, 2 Nov 2023 10:42:10 +0100 Subject: [PATCH 2/2] clarify Serial GC is the default in Native Image (only) --- docs/reference-manual/native-image/MemoryManagement.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference-manual/native-image/MemoryManagement.md b/docs/reference-manual/native-image/MemoryManagement.md index 76735d0549ff..59d3bac9695f 100644 --- a/docs/reference-manual/native-image/MemoryManagement.md +++ b/docs/reference-manual/native-image/MemoryManagement.md @@ -16,7 +16,7 @@ The Java heap is created when the native image starts up, and may increase or de When the heap becomes full, a garbage collection is triggered to reclaim memory of objects that are no longer used. For managing the Java heap, Native Image provides different garbage collector (GC) implementations: -* The **Serial GC** is the default GC in GraalVM. +* The **Serial GC** is the default GC in GraalVM Native Image. It is optimized for low memory footprint and small Java heap sizes. * The **G1 GC** is a multi-threaded GC that is optimized to reduce stop-the-world pauses and therefore improve latency, while achieving high throughput. To enable it, pass the option `--gc=G1` to the `native-image` builder.