Skip to content
Browse files
8276086: Increase size of metaspace mappings
Reviewed-by: goetz, mdoerr
  • Loading branch information
tstuefe committed Oct 29, 2021
1 parent 24cf480 commit e89b2c040c68aebf6a099602bc0e04f963e89c84
Showing 2 changed files with 7 additions and 8 deletions.
@@ -42,13 +42,12 @@ class Settings : public AllStatic {

// The default size of a VirtualSpaceNode, unless created with an explicitly specified size.
// Must be a multiple of the root chunk size.
// Increasing this value decreases the number of mappings used for metadata,
// at the cost of increased virtual size used for Metaspace (or, at least,
// coarser growth steps). Matters mostly for 32bit platforms due to limited
// address space.
// The default of two root chunks has been chosen on a whim but seems to work out okay
// (coming to a mapping size of 8m per node).
static const size_t _virtual_space_node_default_word_size = chunklevel::MAX_CHUNK_WORD_SIZE * 2;
// This value only affects the process virtual size, and there only the granularity with which it
// increases. Matters mostly for 32bit platforms due to limited address space.
// Note that this only affects the non-class metaspace. Class space ignores this size (it is one
// single large mapping).
static const size_t _virtual_space_node_default_word_size =
chunklevel::MAX_CHUNK_WORD_SIZE * NOT_LP64(2) LP64_ONLY(16); // 8MB (32-bit) / 64MB (64-bit)

// Alignment of the base address of a virtual space node
static const size_t _virtual_space_node_reserve_alignment_words = chunklevel::MAX_CHUNK_WORD_SIZE;
@@ -47,7 +47,7 @@ TEST_VM(metaspace, misc_sizes) {
metaspace::chunklevel::MAX_CHUNK_WORD_SIZE * 2);
metaspace::chunklevel::MAX_CHUNK_WORD_SIZE * NOT_LP64(2) LP64_ONLY(16));

1 comment on commit e89b2c0

Copy link

@openjdk-notifier openjdk-notifier bot commented on e89b2c0 Oct 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.