8065050: vm crashes during CDS dump when very small SharedMiscDataSize is specified

Define minimum required sizes for the ro, rw, and md regions and make sure the specified sizes are not less than the minimum sizes

Reviewed-by: jiangli, dholmes, mseledtsov
This commit is contained in:
Calvin Cheung 2014-12-05 12:24:10 -08:00
parent ea256a978f
commit 701b666284
3 changed files with 129 additions and 21 deletions

View file

@ -69,6 +69,11 @@ class MetaspaceShared : AllStatic {
vtbl_common_code_size = (1*K) // conservative size of the "common_code" for the x64 platform
};
enum {
min_ro_size = NOT_LP64(8*M) LP64_ONLY(9*M), // minimum ro and rw regions sizes based on dumping
min_rw_size = NOT_LP64(7*M) LP64_ONLY(12*M) // of a shared archive using the default classlist
};
enum {
ro = 0, // read-only shared space in the heap
rw = 1, // read-write shared space in the heap