有没有办法找到 Java 应用程序中分配了多少字节?如果可以的话,不改代码? 谢谢。
最佳答案
例如,来自这篇文章: Java unit testing: how to measure memory footprint for method call
Runtime.getRuntime().freeMemory();
Runtime.getRuntime().totalMemory();
关于java - Java 应用程序中分配的字节,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34122834/