Summary
-------
The upper bound for the `GCCardSizeInBytes` option must be 512 bytes for 32 bit platforms.
Problem
-------
In JDK-8275142 the new option `GCCardSizeInBytes` as been introduced with upper bounds of 1024 bytes for all platforms. This value does not work for 32 bit platforms due to implementation limitations.
Solution
--------
Reduce the upper bound of `GCCardSizeInBytes` to 512 bytes for 32 bit platforms.
Specification
-------------
diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp
index b57be5abf62..684357297d8 100644
--- a/src/hotspot/share/gc/shared/gc_globals.hpp
+++ b/src/hotspot/share/gc/shared/gc_globals.hpp
@@ -696,7 +696,7 @@
\
product(uint, GCCardSizeInBytes, 512, \
"Card table entry size (in bytes) for card based collectors") \
- range(128, 1024) \
+ range(128, NOT_LP64(512) LP64_ONLY(1024)) \
constraint(GCCardSizeInBytesConstraintFunc,AtParse)
// end of GC_FLAGS