--- old/src/share/vm/services/management.cpp Wed Aug 21 14:33:44 2013 +++ new/src/share/vm/services/management.cpp Wed Aug 21 14:33:40 2013 @@ -876,8 +876,6 @@ total_used += u.used(); total_committed += u.committed(); - // if any one of the memory pool has undefined init_size or max_size, - // set it to -1 if (u.init_size() == (size_t)-1) { has_undefined_init_size = true; } @@ -893,6 +891,15 @@ } } } + + // if any one of the memory pool has undefined init_size or max_size, + // set it to -1 + if (has_undefined_init_size) { + total_init = (size_t)-1; + } + if (has_undefined_max_size) { + total_max = (size_t)-1; + } MemoryUsage usage((heap ? InitialHeapSize : total_init), total_used,