src/share/vm/memory/metaspace.cpp

Print this page

        

@@ -1429,11 +1429,11 @@
   _capacity_until_GC = MaxMetaspaceSize;
 }
 
 void MetaspaceGC::post_initialize() {
   // Reset the high-water mark once the VM initialization is done.
-  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
+  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
 }
 
 bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
   // Check if the compressed class space is full.
   if (is_class && Metaspace::using_class_space()) {

@@ -1489,11 +1489,11 @@
   const double min_tmp = used_after_gc / maximum_used_percentage;
   size_t minimum_desired_capacity =
     (size_t)MIN2(min_tmp, double(max_uintx));
   // Don't shrink less than the initial generation size
   minimum_desired_capacity = MAX2(minimum_desired_capacity,
-                                  MetaspaceSize);
+                                  (size_t)MetaspaceSize);
 
   if (PrintGCDetails && Verbose) {
     gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
     gclog_or_tty->print_cr("  "
                   "  minimum_free_percentage: %6.2f"

@@ -1545,11 +1545,11 @@
     const double maximum_free_percentage = MaxMetaspaceFreeRatio / 100.0;
     const double minimum_used_percentage = 1.0 - maximum_free_percentage;
     const double max_tmp = used_after_gc / minimum_used_percentage;
     size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
     maximum_desired_capacity = MAX2(maximum_desired_capacity,
-                                    MetaspaceSize);
+                                    (size_t)MetaspaceSize);
     if (PrintGCDetails && Verbose) {
       gclog_or_tty->print_cr("  "
                              "  maximum_free_percentage: %6.2f"
                              "  minimum_used_percentage: %6.2f",
                              maximum_free_percentage,

@@ -3195,11 +3195,11 @@
     _first_chunk_word_size = InitialBootClassLoaderMetaspaceSize / BytesPerWord;
     _first_chunk_word_size = align_word_size_up(_first_chunk_word_size);
     // Make the first class chunk bigger than a medium chunk so it's not put
     // on the medium chunk list.   The next chunk will be small and progress
     // from there.  This size calculated by -version.
-    _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
+    _first_class_chunk_word_size = MIN2((uintx)MediumChunk*6,
                                        (CompressedClassSpaceSize/BytesPerWord)*2);
     _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
     // Arbitrarily set the initial virtual space to a multiple
     // of the boot class loader size.
     size_t word_size = VIRTUALSPACEMULTIPLIER * _first_chunk_word_size;