提交 3de8d495 编写于 作者: T tonyp

7078465: G1: Don't use the undefined value (-1) for the G1 old memory pool max size

Reviewed-by: johnc, brutisso
上级 cb25725e
...@@ -89,16 +89,15 @@ class G1CollectedHeap; ...@@ -89,16 +89,15 @@ class G1CollectedHeap;
// //
// * Min Capacity // * Min Capacity
// //
// We set this to 0 for all spaces. We could consider setting the old // We set this to 0 for all spaces.
// min capacity to the min capacity of the heap (see 7078465).
// //
// * Max Capacity // * Max Capacity
// //
// For jstat, we set the max capacity of all spaces to heap_capacity, // For jstat, we set the max capacity of all spaces to heap_capacity,
// given that we don't always have a reasonably upper bound on how big // given that we don't always have a reasonable upper bound on how big
// each space can grow. For the memory pools, we actually make the max // each space can grow. For the memory pools, we make the max
// capacity undefined. We could consider setting the old max capacity // capacity undefined with the exception of the old memory pool for
// to the max capacity of the heap (see 7078465). // which we make the max capacity same as the max heap capacity.
// //
// If we had more accurate occupancy / capacity information per // If we had more accurate occupancy / capacity information per
// region set the above calculations would be greatly simplified and // region set the above calculations would be greatly simplified and
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
return _g1mm->old_space_used(); return _g1mm->old_space_used();
} }
size_t max_size() const { size_t max_size() const {
return _undefined_max; return _g1mm->old_gen_max();
} }
MemoryUsage get_memory_usage(); MemoryUsage get_memory_usage();
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册