RFR: 8353329: Small memory leak when create GrowableArray with initial size 0
Zhengyu Gu
zgu at openjdk.org
Tue Apr 1 00:22:22 UTC 2025
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.
-------------
Commit messages:
- 8353329: Small memory leak when create GrowableArray with initial size 0
Changes: https://git.openjdk.org/jdk/pull/24341/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24341&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8353329
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/24341.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24341/head:pull/24341
PR: https://git.openjdk.org/jdk/pull/24341
More information about the hotspot-dev
mailing list