Request for review 8003705: CDS failed on Windows: cannot map in the CDS

harold seigel harold.seigel at
Thu Dec 20 09:09:41 PST 2012


Please review the following changes to fix bug 8003705.

When trying to read the CDS file, the existing code was calling both the 
Windows VirtualAlloc() and MapViewOfFileEx() api's.  The calls to 
MapViewOfFileEx() were failing with ERROR_INVALID_ADDRESS because 
VirtualAlloc() had already reserved the memory.

This fix prevents the call to VirtualAlloc(), allowing the 
MapViewOfFileEx() calls to succeed.

Another problem was that 'java -Xshare:dump calls were unable to 
overwrite an existing CDS file.  This change fixes this by granting the 
owner full permission when creating the CDS file (mode o744).

Open webrev at
Bug link at


More information about the hotspot-runtime-dev mailing list