Integrated: 8353329: Small memory leak when create GrowableArray with initial size 0
Zhengyu Gu
zgu at openjdk.org
Wed Apr 2 11:59:15 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.
This pull request has now been integrated.
Changeset: b80b04d7
Author: Zhengyu Gu <zgu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b80b04d77afdb2a808e2c7f9268d8092eb16714e
Stats: 10 lines in 2 files changed: 5 ins; 4 del; 1 mod
8353329: Small memory leak when create GrowableArray with initial size 0
Reviewed-by: jsjolen, stefank
-------------
PR: https://git.openjdk.org/jdk/pull/24341
More information about the hotspot-dev
mailing list