src/share/vm/services/management.cpp

changeset 5571
a70566600baf
parent 5472
c01913206da5
child 5790
72b7e96c1922
     1.1 --- a/src/share/vm/services/management.cpp	Wed Aug 21 13:18:52 2013 +0200
     1.2 +++ b/src/share/vm/services/management.cpp	Wed Aug 21 22:12:11 2013 -0700
     1.3 @@ -876,8 +876,6 @@
     1.4        total_used += u.used();
     1.5        total_committed += u.committed();
     1.6  
     1.7 -      // if any one of the memory pool has undefined init_size or max_size,
     1.8 -      // set it to -1
     1.9        if (u.init_size() == (size_t)-1) {
    1.10          has_undefined_init_size = true;
    1.11        }
    1.12 @@ -894,6 +892,15 @@
    1.13      }
    1.14    }
    1.15  
    1.16 +  // if any one of the memory pool has undefined init_size or max_size,
    1.17 +  // set it to -1
    1.18 +  if (has_undefined_init_size) {
    1.19 +    total_init = (size_t)-1;
    1.20 +  }
    1.21 +  if (has_undefined_max_size) {
    1.22 +    total_max = (size_t)-1;
    1.23 +  }
    1.24 +
    1.25    MemoryUsage usage((heap ? InitialHeapSize : total_init),
    1.26                      total_used,
    1.27                      total_committed,

mercurial