java - How to identify Tenured Space -
i want build memorywarningsystem described in many articles: e.g. in http://www.javaspecialists.eu/archive/issue092.html.
therefore, want identify tenured space this:
private memorypoolmxbean findtenuredgenpool() { (memorypoolmxbean pool : managementfactory.getmemorypoolmxbeans()) { if(pool tenured space) return tenured } }
i have seen 2 different ways identify tenured space
- check if pool name equals "ps old gen" and/or "tenured gen".
- check whether "
pool.gettype() == memorytype.heap && pool.isusagethresholdsupported()
"
problem 1: cms old gen? other tenured spaces? should add of them list of tenured names?
problem 2: "safe" way of retrieving tenured space? reliable?
thanks!
for hotspot jvm possible memory pool name old space
tenured gen
ps old gen
cms old gen
g1 old gen
for jrockit
old space
Comments
Post a Comment