hotspot/src/share/vm/code/nmethod.cpp
changeset 27420 04e6f914cce1
parent 26912 19021f626ad2
child 27429 4ccd0992d680
equal deleted inserted replaced
27419:a934f24b4dcf 27420:04e6f914cce1
   802   }
   802   }
   803 }
   803 }
   804 #endif // def HAVE_DTRACE_H
   804 #endif // def HAVE_DTRACE_H
   805 
   805 
   806 void* nmethod::operator new(size_t size, int nmethod_size, int comp_level) throw () {
   806 void* nmethod::operator new(size_t size, int nmethod_size, int comp_level) throw () {
   807   // With a SegmentedCodeCache, nmethods are allocated on separate heaps and therefore do not share memory
   807   return CodeCache::allocate(nmethod_size, CodeCache::get_code_blob_type(comp_level));
   808   // with critical CodeBlobs. We define the allocation as critical to make sure all code heap memory is used.
       
   809   bool is_critical = SegmentedCodeCache;
       
   810   return CodeCache::allocate(nmethod_size, CodeCache::get_code_blob_type(comp_level), is_critical);
       
   811 }
   808 }
   812 
   809 
   813 nmethod::nmethod(
   810 nmethod::nmethod(
   814   Method* method,
   811   Method* method,
   815   int nmethod_size,
   812   int nmethod_size,