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

Zhengyu Gu zgu at openjdk.org
Tue Apr 1 15:39:38 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 one additional commit since the last revision:

  Added empty lines

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24341/files
  - new: https://git.openjdk.org/jdk/pull/24341/files/ba9df7d6..306eb851

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24341&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24341&range=01-02

  Stats: 2 lines in 1 file changed: 2 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