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

Zhengyu Gu zgu at openjdk.org
Wed Apr 2 11:59:14 UTC 2025


On Tue, 1 Apr 2025 15:39:38 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.
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added empty lines

Thanks  for the reviews, @jdksjolen and @stefank

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

PR Comment: https://git.openjdk.org/jdk/pull/24341#issuecomment-2772328598


More information about the hotspot-dev mailing list