RFR: 8353329: Small memory leak when create GrowableArray with initial size 0

Johan Sjölen jsjolen at openjdk.org
Tue Apr 1 07:26:14 UTC 2025


On Tue, 1 Apr 2025 00:18:07 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> Please review this small fix to avoid 1 byte leak when create a GrowableArray with initial size = 0.
> 
> GrowableArray's c-heap allocator does not check size = 0 and os:malloc(0) will malloc at least 1 byte.

Marked as reviewed by jsjolen (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/24341#pullrequestreview-2731723994


More information about the hotspot-dev mailing list