--- old/src/share/vm/memory/metaspace.cpp 2014-06-18 08:47:20.667177519 +0200 +++ new/src/share/vm/memory/metaspace.cpp 2014-06-18 08:47:20.562179062 +0200 @@ -1431,7 +1431,7 @@ 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) { @@ -1491,7 +1491,7 @@ (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: "); @@ -1547,7 +1547,7 @@ 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" @@ -3197,7 +3197,7 @@ // 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