< prev index next >
src/share/vm/memory/metaspaceShared.hpp
Print this page
*** 130,139 ****
--- 130,140 ----
static size_t _cds_i2i_entry_code_buffers_size;
// Used only during dumping.
static SharedMiscRegion _md;
static SharedMiscRegion _mc;
+ static SharedMiscRegion _od;
public:
enum {
vtbl_list_size = DEFAULT_VTBL_LIST_SIZE,
num_virtuals = DEFAULT_VTBL_VIRTUALS_COUNT,
vtbl_method_size = DEFAULT_VTBL_METHOD_SIZE,
*** 146,156 ****
md = 2, // miscellaneous data for initializing tables, etc.
mc = 3, // miscellaneous code - vtable replacement.
max_strings = 2, // max number of string regions in string space
num_non_strings = 4, // number of non-string regions
first_string = num_non_strings, // index of first string region
! n_regions = max_strings + num_non_strings // total number of regions
};
// Accessor functions to save shared space created for metadata, which has
// extra space allocated at the end for miscellaneous data and code.
static void set_max_alignment(int alignment) {
--- 147,160 ----
md = 2, // miscellaneous data for initializing tables, etc.
mc = 3, // miscellaneous code - vtable replacement.
max_strings = 2, // max number of string regions in string space
num_non_strings = 4, // number of non-string regions
first_string = num_non_strings, // index of first string region
! // The optional data region is the last region.
! // Currently it only contains class file data.
! od = max_strings + num_non_strings,
! n_regions = od + 1 // total number of regions
};
// Accessor functions to save shared space created for metadata, which has
// extra space allocated at the end for miscellaneous data and code.
static void set_max_alignment(int alignment) {
*** 220,232 ****
static void link_and_cleanup_shared_classes(TRAPS);
static int count_class(const char* classlist_file);
static void estimate_regions_size() NOT_CDS_RETURN;
! // Allocate a block of memory from the "mc" or "md" regions.
static char* misc_code_space_alloc(size_t num_bytes) { return _mc.alloc(num_bytes); }
static char* misc_data_space_alloc(size_t num_bytes) { return _md.alloc(num_bytes); }
static address cds_i2i_entry_code_buffers(size_t total_size);
static address cds_i2i_entry_code_buffers() {
return _cds_i2i_entry_code_buffers;
--- 224,237 ----
static void link_and_cleanup_shared_classes(TRAPS);
static int count_class(const char* classlist_file);
static void estimate_regions_size() NOT_CDS_RETURN;
! // Allocate a block of memory from the "mc", "md", or "od" regions.
static char* misc_code_space_alloc(size_t num_bytes) { return _mc.alloc(num_bytes); }
static char* misc_data_space_alloc(size_t num_bytes) { return _md.alloc(num_bytes); }
+ static char* optional_data_space_alloc(size_t num_bytes) { return _od.alloc(num_bytes); }
static address cds_i2i_entry_code_buffers(size_t total_size);
static address cds_i2i_entry_code_buffers() {
return _cds_i2i_entry_code_buffers;
*** 241,247 ****
--- 246,256 ----
}
static SharedMiscRegion* misc_data_region() {
assert(DumpSharedSpaces, "used during dumping only");
return &_md;
}
+ static SharedMiscRegion* optional_data_region() {
+ assert(DumpSharedSpaces, "used during dumping only");
+ return &_od;
+ }
};
#endif // SHARE_VM_MEMORY_METASPACESHARED_HPP
< prev index next >