< prev index next >

src/hotspot/share/memory/metaspace.cpp

Print this page
*** 689,11 ***
    MetaspaceGC::initialize(); // <- since we do not prealloc init chunks anymore is this still needed?
  
    metaspace::ChunkHeaderPool::initialize();
  
    if (CDSConfig::is_dumping_static_archive()) {
!     assert(!UseSharedSpaces, "sanity");
      MetaspaceShared::initialize_for_static_dump();
    }
  
    // If UseCompressedClassPointers=1, we have two cases:
    // a) if CDS is active (runtime, Xshare=on), it will create the class space
--- 689,13 ---
    MetaspaceGC::initialize(); // <- since we do not prealloc init chunks anymore is this still needed?
  
    metaspace::ChunkHeaderPool::initialize();
  
    if (CDSConfig::is_dumping_static_archive()) {
!     if (!CDSConfig::is_dumping_final_static_archive()) {
+       assert(!UseSharedSpaces, "sanity");
+     }
      MetaspaceShared::initialize_for_static_dump();
    }
  
    // If UseCompressedClassPointers=1, we have two cases:
    // a) if CDS is active (runtime, Xshare=on), it will create the class space

*** 856,10 ***
--- 858,11 ---
  
    if (HAS_PENDING_EXCEPTION) {
      assert(false, "Should not allocate with exception pending");
      return nullptr;  // caller does a CHECK_NULL too
    }
+   //leyden/premain: temporarily disabled due to JDK-8327737
    assert(!THREAD->owns_locks(), "allocating metaspace while holding mutex");
  
    MetaWord* result = allocate(loader_data, word_size, type);
  
    if (result == nullptr) {
< prev index next >