title: Why MetaSpace Size is twice as big as Used MetaSpace?
body: <p>I wrote a program to simulate MetaSpace OOM. But I found that <code>MetaSpace Size</code> is almost always twice as big as <code>Used MetaSpace</code>. Why?</p>
  
  <p>I run my program with flag <code>-XX:MaxMetaspaceSize=50m</code>, the program throw OOM when <code>Used MetaSpace</code> reached about 25M rather than 50M, Why?</p>
  
  <p><a href="https://i.stack.imgur.com/pRlsK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pRlsK.png" alt="enter image description here"></a></p>