会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
不如来编码
C & M & WRITING BAD
博客园
首页
新随笔
联系
订阅
管理
2017年8月6日
如何看一段JAVA代码耗了多少内存
摘要: 简单的方法,如下: Runtime r = Runtime.getRuntime(); r.gc(); long startMem = r.freememory(); // 开始时的剩余内存 你的代码……long orz = startMem - r.freememory(); // 剩余内存 现在
阅读全文
posted @ 2017-08-06 22:26 陆敏技
阅读(751)
评论(0)
推荐(0)
编辑
公告
Coupon for Contacts