comparison src/hotspot/share/memory/filemap.cpp @ 55534:2216e1963765

Merge
author mikael
date Mon, 01 Jul 2019 16:43:59 -0700
parents 1512d88b24c6
children 7b7df2be6219 b279ae9843b8
comparison
equal deleted inserted replaced
38:66f2e7d31328 39:6375838561ef
1078 1078
1079 return rs; 1079 return rs;
1080 } 1080 }
1081 1081
1082 // Memory map a region in the address space. 1082 // Memory map a region in the address space.
1083 static const char* shared_region_name[] = { "MiscData", "ReadWrite", "ReadOnly", "MiscCode", "OptionalData", 1083 static const char* shared_region_name[] = { "MiscData", "ReadWrite", "ReadOnly", "MiscCode",
1084 "String1", "String2", "OpenArchive1", "OpenArchive2" }; 1084 "String1", "String2", "OpenArchive1", "OpenArchive2" };
1085 1085
1086 char* FileMapInfo::map_regions(int regions[], char* saved_base[], size_t len) { 1086 char* FileMapInfo::map_regions(int regions[], char* saved_base[], size_t len) {
1087 char* prev_top = NULL; 1087 char* prev_top = NULL;
1088 char* curr_base; 1088 char* curr_base;
1092 curr_base = map_region(regions[i], &curr_top); 1092 curr_base = map_region(regions[i], &curr_top);
1093 if (curr_base == NULL) { 1093 if (curr_base == NULL) {
1094 return NULL; 1094 return NULL;
1095 } 1095 }
1096 if (i > 0) { 1096 if (i > 0) {
1097 // We require that mc->rw->ro->md->od to be laid out consecutively, with no 1097 // We require that mc->rw->ro->md to be laid out consecutively, with no
1098 // gaps between them. That way, we can ensure that the OS won't be able to 1098 // gaps between them. That way, we can ensure that the OS won't be able to
1099 // allocate any new memory spaces inside _shared_metaspace_{base,top}, which 1099 // allocate any new memory spaces inside _shared_metaspace_{base,top}, which
1100 // would mess up the simple comparision in MetaspaceShared::is_in_shared_metaspace(). 1100 // would mess up the simple comparision in MetaspaceShared::is_in_shared_metaspace().
1101 assert(curr_base == prev_top, "must be"); 1101 assert(curr_base == prev_top, "must be");
1102 } 1102 }