If you want to dynamically monitor heap usage from within a thread, you can use Runtime.totalMemory(). It returns the amount of memory in the JVM.
確定! 回上一頁