提交 7cf4209d 编写于 作者: T tonyp

6906565: G1: deal with compilation warning in g1MemoryPool.hpp

Summary: size_t max_size() hides size_t max_size() const.
Reviewed-by: jmasa, ysr
上级 bc0d9e36
......@@ -116,7 +116,7 @@ MemoryUsage G1EdenPool::get_memory_usage() {
size_t initial_sz = initial_size();
size_t max_sz = max_size();
size_t used = used_in_bytes();
size_t committed = eden_space_committed();
size_t committed = eden_space_committed(_g1h);
return MemoryUsage(initial_sz, used, committed, max_sz);
}
......@@ -133,7 +133,7 @@ MemoryUsage G1SurvivorPool::get_memory_usage() {
size_t initial_sz = initial_size();
size_t max_sz = max_size();
size_t used = used_in_bytes();
size_t committed = survivor_space_committed();
size_t committed = survivor_space_committed(_g1h);
return MemoryUsage(initial_sz, used, committed, max_sz);
}
......@@ -150,7 +150,7 @@ MemoryUsage G1OldGenPool::get_memory_usage() {
size_t initial_sz = initial_size();
size_t max_sz = max_size();
size_t used = used_in_bytes();
size_t committed = old_space_committed();
size_t committed = old_space_committed(_g1h);
return MemoryUsage(initial_sz, used, committed, max_sz);
}
......@@ -103,8 +103,6 @@ class G1CollectedHeap;
// we can easily share them among the subclasses.
class G1MemoryPoolSuper : public CollectedMemoryPool {
private:
G1CollectedHeap* _g1h;
// It returns x - y if x > y, 0 otherwise.
// As described in the comment above, some of the inputs to the
// calculations we have to do are obtained concurrently and hence
......@@ -121,6 +119,8 @@ private:
}
protected:
G1CollectedHeap* _g1h;
// Would only be called from subclasses.
G1MemoryPoolSuper(G1CollectedHeap* g1h,
const char* name,
......@@ -152,38 +152,6 @@ protected:
static size_t old_space_committed(G1CollectedHeap* g1h);
static size_t old_space_used(G1CollectedHeap* g1h);
static size_t old_space_max(G1CollectedHeap* g1h);
// The non-static versions are included for convenience.
size_t eden_space_committed() {
return eden_space_committed(_g1h);
}
size_t eden_space_used() {
return eden_space_used(_g1h);
}
size_t eden_space_max() {
return eden_space_max(_g1h);
}
size_t survivor_space_committed() {
return survivor_space_committed(_g1h);
}
size_t survivor_space_used() {
return survivor_space_used(_g1h);
}
size_t survivor_space_max() {
return survivor_space_max(_g1h);
}
size_t old_space_committed() {
return old_space_committed(_g1h);
}
size_t old_space_used() {
return old_space_used(_g1h);
}
size_t old_space_max() {
return old_space_max(_g1h);
}
};
// Memory pool that represents the G1 eden.
......@@ -192,10 +160,10 @@ public:
G1EdenPool(G1CollectedHeap* g1h);
size_t used_in_bytes() {
return eden_space_used();
return eden_space_used(_g1h);
}
size_t max_size() {
return eden_space_max();
size_t max_size() const {
return eden_space_max(_g1h);
}
MemoryUsage get_memory_usage();
};
......@@ -206,10 +174,10 @@ public:
G1SurvivorPool(G1CollectedHeap* g1h);
size_t used_in_bytes() {
return survivor_space_used();
return survivor_space_used(_g1h);
}
size_t max_size() {
return survivor_space_max();
size_t max_size() const {
return survivor_space_max(_g1h);
}
MemoryUsage get_memory_usage();
};
......@@ -220,10 +188,10 @@ public:
G1OldGenPool(G1CollectedHeap* g1h);
size_t used_in_bytes() {
return old_space_used();
return old_space_used(_g1h);
}
size_t max_size() {
return old_space_max();
size_t max_size() const {
return old_space_max(_g1h);
}
MemoryUsage get_memory_usage();
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册