This commit is contained in:
Ioi Lam 2015-06-17 22:49:17 +00:00
commit 09a689cd20

View File

@ -647,8 +647,8 @@ char* FileMapInfo::map_region(int i) {
return base; return base;
} }
MemRegion *string_ranges = NULL; static MemRegion *string_ranges = NULL;
int num_ranges = 0; static int num_ranges = 0;
bool FileMapInfo::map_string_regions() { bool FileMapInfo::map_string_regions() {
#if INCLUDE_ALL_GCS #if INCLUDE_ALL_GCS
if (UseG1GC && UseCompressedOops && UseCompressedClassPointers) { if (UseG1GC && UseCompressedOops && UseCompressedClassPointers) {
@ -737,7 +737,10 @@ bool FileMapInfo::verify_string_regions() {
} }
void FileMapInfo::fixup_string_regions() { void FileMapInfo::fixup_string_regions() {
if (string_ranges != NULL) { // If any string regions were found, call the fill routine to make them parseable.
// Note that string_ranges may be non-NULL even if no ranges were found.
if (num_ranges != 0) {
assert(string_ranges != NULL, "Null string_ranges array with non-zero count");
G1CollectedHeap::heap()->fill_archive_regions(string_ranges, num_ranges); G1CollectedHeap::heap()->fill_archive_regions(string_ranges, num_ranges);
} }
} }