This flag controls the maximum size of an object that is allowed to be allocated in eden-space of the young generation. The rational is that large objs should be allocated in old-gen directly to avoid the promotion overhead. This flag is exclusively used by Serial GC.
The default value of this flag is zero, which means any objs can be allocated in eden-space if there is free space. In other words, in the default case, this flag is a no-op.
However, figuring out the right value for this flag is often difficult, because it requires deep insight into the app allocation behavior. Additionally, certain large objs can be short-lived, but directly allocating them in old-gen means young-gc can't reclaim them any more.
Remove this flag to let GC decide whether an object should be directly allocated in old-gen or not.
The default value of this flag is zero, which means any objs can be allocated in eden-space if there is free space. In other words, in the default case, this flag is a no-op.
However, figuring out the right value for this flag is often difficult, because it requires deep insight into the app allocation behavior. Additionally, certain large objs can be short-lived, but directly allocating them in old-gen means young-gc can't reclaim them any more.
Remove this flag to let GC decide whether an object should be directly allocated in old-gen or not.
- csr for
-
JDK-8366156 Serial: Obsolete PretenureSizeThreshold
-
- Draft
-
- links to
-
Review(master) openjdk/jdk/26941