RFR (S) 8150465: Unsafe methods to produce uninitialized arrays

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Feb 24 23:51:26 UTC 2016


On 02/25/2016 02:21 AM, Vladimir Kozlov wrote:
> What is your story for GC? When an array become visible and GC happens,
> it will expect only initialized arrays.

New method allows primitive arrays only, and its headers should be
intact. This is corroborated by the new jtreg test (and benchmarks!)
that allocate lots of uninitialized arrays, and obviously they get GCed.

Are there specific concerns about GC seeing an uninitialized primitive
array?

Thanks,
-Aleksey



More information about the jdk9-dev mailing list