874 if ((heap && pool->is_heap()) || (!heap && pool->is_non_heap())) { |
874 if ((heap && pool->is_heap()) || (!heap && pool->is_non_heap())) { |
875 MemoryUsage u = pool->get_memory_usage(); |
875 MemoryUsage u = pool->get_memory_usage(); |
876 total_used += u.used(); |
876 total_used += u.used(); |
877 total_committed += u.committed(); |
877 total_committed += u.committed(); |
878 |
878 |
879 // if any one of the memory pool has undefined init_size or max_size, |
|
880 // set it to -1 |
|
881 if (u.init_size() == (size_t)-1) { |
879 if (u.init_size() == (size_t)-1) { |
882 has_undefined_init_size = true; |
880 has_undefined_init_size = true; |
883 } |
881 } |
884 if (!has_undefined_init_size) { |
882 if (!has_undefined_init_size) { |
885 total_init += u.init_size(); |
883 total_init += u.init_size(); |
890 } |
888 } |
891 if (!has_undefined_max_size) { |
889 if (!has_undefined_max_size) { |
892 total_max += u.max_size(); |
890 total_max += u.max_size(); |
893 } |
891 } |
894 } |
892 } |
|
893 } |
|
894 |
|
895 // if any one of the memory pool has undefined init_size or max_size, |
|
896 // set it to -1 |
|
897 if (has_undefined_init_size) { |
|
898 total_init = (size_t)-1; |
|
899 } |
|
900 if (has_undefined_max_size) { |
|
901 total_max = (size_t)-1; |
895 } |
902 } |
896 |
903 |
897 MemoryUsage usage((heap ? InitialHeapSize : total_init), |
904 MemoryUsage usage((heap ? InitialHeapSize : total_init), |
898 total_used, |
905 total_used, |
899 total_committed, |
906 total_committed, |