Withdrawn: 8367754: G1: Add a fast path in heap resize related method

duke duke at openjdk.org
Sat Nov 15 00:50:36 UTC 2025


On Wed, 17 Sep 2025 15:32:12 GMT, Guanqiang Han <ghan at openjdk.org> wrote:

> Please review this change.
> 
> **Description:**
> 
> It's common for some Java application engineers to configure the heap with the same minimum and maximum size in order to avoid the overhead of heap resizing.In such cases no expansion or shrinkage is possible, so i think we can adds a fast path at the beginning of the method to detect when the heap’s min and max capacities are equal and return early, thereby avoiding unnecessary computation.
> I added a check to determine whether MinHeapSize and MaxHeapSize are equal before performing the heap resize calculation. Since both MaxHeapSize and MinHeapSize are aligned to HeapAlignment, so  i think comparing them directly is good.
> 
> **Test:**
> 
> GHA

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.org/jdk/pull/27349


More information about the hotspot-gc-dev mailing list