8255990: Bitmap region of dynamic CDS archive is not unmapped
Reviewed-by: iklam, minqi
This commit is contained in:
parent
943acd22e5
commit
c6ab0fdb15
@ -1748,6 +1748,7 @@ void MetaspaceShared::initialize_shared_spaces() {
|
|||||||
SymbolTable::serialize_shared_table_header(&rc, false);
|
SymbolTable::serialize_shared_table_header(&rc, false);
|
||||||
SystemDictionaryShared::serialize_dictionary_headers(&rc, false);
|
SystemDictionaryShared::serialize_dictionary_headers(&rc, false);
|
||||||
dynamic_mapinfo->close();
|
dynamic_mapinfo->close();
|
||||||
|
dynamic_mapinfo->unmap_region(MetaspaceShared::bm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PrintSharedArchiveAndExit) {
|
if (PrintSharedArchiveAndExit) {
|
||||||
|
@ -91,6 +91,8 @@ public class DynamicArchiveRelocationTest extends DynamicArchiveTestBase {
|
|||||||
String topArchiveName = getNewArchiveName("top");
|
String topArchiveName = getNewArchiveName("top");
|
||||||
|
|
||||||
String runtimeMsg = "Try to map archive(s) at an alternative address";
|
String runtimeMsg = "Try to map archive(s) at an alternative address";
|
||||||
|
String unmapPrefix = ".*Unmapping region #3 at base 0x.*";
|
||||||
|
String unmapPattern = unmapPrefix + "(Bitmap)";
|
||||||
String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
|
String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
|
||||||
|
|
||||||
// (1) Dump base archive (static)
|
// (1) Dump base archive (static)
|
||||||
@ -121,7 +123,12 @@ public class DynamicArchiveRelocationTest extends DynamicArchiveTestBase {
|
|||||||
"-cp", appJar, mainClass)
|
"-cp", appJar, mainClass)
|
||||||
.assertNormalExit(output -> {
|
.assertNormalExit(output -> {
|
||||||
if (run_reloc) {
|
if (run_reloc) {
|
||||||
output.shouldContain(runtimeMsg);
|
output.shouldContain(runtimeMsg)
|
||||||
|
// Check that there are two of the following lines in
|
||||||
|
// the output. One for static archive and one for
|
||||||
|
// dynamic archive:
|
||||||
|
// Unmapping region #3 at base 0x<hex digits> (Bitmap)
|
||||||
|
.shouldMatchByLine(unmapPrefix, "Hello World", unmapPattern);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user