< prev index next >

src/hotspot/share/memory/dynamicArchive.cpp

Print this page

        

@@ -754,14 +754,10 @@
   for (int i = 0; i < _klasses->length(); i++) {
     InstanceKlass* ik = _klasses->at(i);
     Array<Method*>* methods = ik->methods();
     total += each_method_bytes * methods->length();
   }
-  if (total == 0) {
-    // We have nothing to archive, but let's avoid having an empty region.
-    total = SharedRuntime::trampoline_size();
-  }
   return total;
 }
 
 void DynamicArchiveBuilder::make_trampolines() {
   for (int i = 0; i < _klasses->length(); i++) {

@@ -776,15 +772,10 @@
         (AdapterHandlerEntry**)MetaspaceShared::misc_code_space_alloc(sizeof(AdapterHandlerEntry*));
       *adapter_trampoline = NULL;
       m->set_adapter_trampoline(to_target(adapter_trampoline));
     }
   }
-
-  if (MetaspaceShared::misc_code_dump_space()->used() == 0) {
-    // We have nothing to archive, but let's avoid having an empty region.
-    MetaspaceShared::misc_code_space_alloc(SharedRuntime::trampoline_size());
-  }
 }
 
 void DynamicArchiveBuilder::make_klasses_shareable() {
   int i, count = _klasses->length();
 
< prev index next >