title: Is there a way to measure direct memory usage in Java?
body: <p>If I create a buffer via <code>ByteBuffer.allocateDirect()</code>, the memory exists outside of the Java heap.  Is there a way to measure this kind of memory usage from my application in a cross-platform way similar to how I can measure Java heap usage with <code>Runtime.totalMemory()</code> and <code>Runtime.freeMemory()</code>?</p>