JDK-8074459 : Flags handling memory sizes should be of type size_t
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-03-04
  • Updated: 2018-05-17
  • Resolved: 2015-03-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b59Fixed
Related Reports
Blocks :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Since JDK-8054823 it is possible to use size_t as the type for the JVM command line flags. There are a number of flags that are handling memory sizes and should be changed to use size_t.

List of flags to be updated:

BaseFootPrintEstimate
CMSBitMapYieldQuantum
CMSConcMarkMultiple
CMSOldPLABMax
CMSOldPLABMin
CMSRescanMultiple
CMSScheduleRemarkEdenSizeThreshold
CMSYoungGenPerWorker
CodeCacheExpansionSize
CodeCacheMinimumUseSpace
CodeCacheSegmentSize
CompressedClassSpaceSize
ErgoHeapSizeLimit
GCLogFileSize
HandleAllocationLimit
HeapBaseMinAddress
HeapDumpSegmentSize
HeapSizePerGCThread
InitialBootClassLoaderMetaspaceSize
InitialCodeCacheSize
InitialHeapSize
JVMInvokeMethodSlack
LargePageHeapSizeThreshold
LargePageSizeInBytes
MarkStackSize
MarkStackSizeMax
MaxDirectMemorySize
MaxHeapSize
MaxMetaspaceExpansion
MaxMetaspaceSize
MaxNewSize
MetaspaceSize
MinHeapDeltaBytes
MinMetaspaceExpansion
MinTLABSize
NewSize
NewSizeThreadIncrease
NonNMethodCodeHeapSize
NonProfiledCodeHeapSize
NUMASpaceResizeRate
OldPLABSize
OldSize
PretenureSizeThreshold
ProfiledCodeHeapSize
ReservedCodeCacheSize
SharedMiscCodeSize
SharedMiscDataSize
SharedReadOnlySize
SharedReadWriteSize
ThreadSafetyMargin
TLABSize
TotalHandleAllocationLimit
YoungPLABSize

Comments
The original list of flags contained a set of flags for the code cache and code heap. When changing these flags there were several failures in testing. The compiler code uses int in several places in combination with these flags and to change this code to work properly with size_t will require someone from the compiler team. I have a new change where the G1 flags mentioned above is included and the compiler flags are left out: http://cr.openjdk.java.net/~jwilhelm/8074459/webrev.01/
10-03-2015

for G1: G1SATBBufferSize G1UpdateBufferSize G1ConcRSLogCacheSize G1HeapRegionSize G1RSetScanBlockSize
06-03-2015

Here is a suggested patch to fix this: http://cr.openjdk.java.net/~jwilhelm/8074459/webrev.00/
05-03-2015

This change could reduce the work needed for JDK-8046938.
05-03-2015