Skip to content

Commit 5ce3d0d

Browse files
committedJun 2, 2020
8245707: Increase Metaspace reserve alignment
Reviewed-by: iklam, coleenp
1 parent 334df28 commit 5ce3d0d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/hotspot/share/memory/metaspace.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,13 @@ void Metaspace::ergo_initialize() {
10771077
_commit_alignment = page_size;
10781078
_reserve_alignment = MAX2(page_size, (size_t)os::vm_allocation_granularity());
10791079

1080+
// The upcoming Metaspace rewrite will impose a higher alignment granularity.
1081+
// To prepare for that and to catch/prevent any misuse of Metaspace alignment
1082+
// which may creep in, up the alignment a bit.
1083+
if (_reserve_alignment == 4 * K) {
1084+
_reserve_alignment *= 4;
1085+
}
1086+
10801087
// Do not use FLAG_SET_ERGO to update MaxMetaspaceSize, since this will
10811088
// override if MaxMetaspaceSize was set on the command line or not.
10821089
// This information is needed later to conform to the specification of the

0 commit comments

Comments
 (0)
Please sign in to comment.