RFR: 8353329: Small memory leak when create GrowableArray with initial size 0 [v2]
Zhengyu Gu
zgu at openjdk.org
Tue Apr 1 15:19:28 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.
Zhengyu Gu has updated the pull request incrementally with two additional commits since the last revision:
- Copyright year
- stefank's comment
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24341/files
- new: https://git.openjdk.org/jdk/pull/24341/files/126f4e28..ba9df7d6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24341&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24341&range=00-01
Stats: 8 lines in 2 files changed: 2 ins; 4 del; 2 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