--- a/src/hotspot/share/memory/metaspaceShared.hpp Sat Nov 03 12:37:55 2018 -0700
+++ b/src/hotspot/share/memory/metaspaceShared.hpp Sat Nov 03 15:40:19 2018 -0400
@@ -76,13 +76,14 @@
num_non_heap_spaces = od + 1,
// mapped java heap regions
- first_string = od + 1, // index of first string region
- max_strings = 2, // max number of string regions in string space
- last_string = first_string + max_strings - 1,
- first_open_archive_heap_region = first_string + max_strings,
+ first_closed_archive_heap_region = od + 1,
+ max_closed_archive_heap_region = 2,
+ last_closed_archive_heap_region = first_closed_archive_heap_region + max_closed_archive_heap_region - 1,
+ first_open_archive_heap_region = last_closed_archive_heap_region + 1,
max_open_archive_heap_region = 2,
+ last_open_archive_heap_region = first_open_archive_heap_region + max_open_archive_heap_region - 1,
- last_valid_region = first_open_archive_heap_region + max_open_archive_heap_region - 1,
+ last_valid_region = last_open_archive_heap_region,
n_regions = last_valid_region + 1 // total number of regions
};
@@ -131,23 +132,6 @@
// Return true if given address is in the shared region corresponding to the idx
static bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false);
- static bool is_heap_region(int idx) {
- CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_string &&
- idx < MetaspaceShared::first_open_archive_heap_region +
- MetaspaceShared::max_open_archive_heap_region));
- NOT_CDS_JAVA_HEAP_RETURN_(false);
- }
- static bool is_string_region(int idx) {
- CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_string &&
- idx < MetaspaceShared::first_string + MetaspaceShared::max_strings));
- NOT_CDS_JAVA_HEAP_RETURN_(false);
- }
- static bool is_open_archive_heap_region(int idx) {
- CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_open_archive_heap_region &&
- idx < MetaspaceShared::first_open_archive_heap_region +
- MetaspaceShared::max_open_archive_heap_region));
- NOT_CDS_JAVA_HEAP_RETURN_(false);
- }
static bool is_in_trampoline_frame(address addr) NOT_CDS_RETURN_(false);
static void allocate_cpp_vtable_clones();