891 if (!has_undefined_max_size) { |
891 if (!has_undefined_max_size) { |
892 total_max += u.max_size(); |
892 total_max += u.max_size(); |
893 } |
893 } |
894 } |
894 } |
895 } |
895 } |
896 |
|
897 // In our current implementation, we make sure that all non-heap |
|
898 // pools have defined init and max sizes. Heap pools do not matter, |
|
899 // as we never use total_init and total_max for them. |
|
900 assert(heap || !has_undefined_init_size, "Undefined init size"); |
|
901 assert(heap || !has_undefined_max_size, "Undefined max size"); |
|
902 |
896 |
903 MemoryUsage usage((heap ? InitialHeapSize : total_init), |
897 MemoryUsage usage((heap ? InitialHeapSize : total_init), |
904 total_used, |
898 total_used, |
905 total_committed, |
899 total_committed, |
906 (heap ? Universe::heap()->max_capacity() : total_max)); |
900 (heap ? Universe::heap()->max_capacity() : total_max)); |