gpt4 book ai didi

android - 如何从 Logcat 中的消息日志中检查内存泄漏?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:14:19 27 4
gpt4 key购买 nike

这是我的日志

01-13 14:37:50.634: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 86K, 50% free 2735K/5379K, external 0K/0K, paused 29ms
01-13 14:37:50.765: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:37:50.765: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:37:50.765: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:37:50.765: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:37:50.785: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:37:50.785: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:37:50.785: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:37:50.785: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:37:50.845: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:37:50.845: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:37:50.855: I/[POST_RESELECT](27390): [handleTextChanged] (start,before,after)=(0,0,4)
01-13 14:37:50.855: I/[POST_RESELECT](27390): [handleTextChanged] (start,before,after)=(0,0,3)
01-13 14:37:51.986: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:37:51.986: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:37:52.676: D/dalvikvm(27390): GC_CONCURRENT freed 121K, 47% free 3009K/5639K, external 1850K/2199K, paused 2ms+2ms
01-13 14:37:53.307: E/[JsonHelper]getJsonArrayFromUrlWithData(String url, List<NameValuePair> datas)(27390): Error converting data org.json.JSONException: Value null of type org.json.JSONObject$1 cannot be converted to JSONArray
01-13 14:37:54.538: D/dalvikvm(27390): GC_CONCURRENT freed 393K, 47% free 3377K/6279K, external 2003K/2199K, paused 2ms+3ms
01-13 14:37:54.698: D/dalvikvm(27390): GC_CONCURRENT freed 728K, 48% free 3615K/6855K, external 2003K/2199K, paused 2ms+3ms
01-13 14:37:54.798: D/dalvikvm(27390): GC_CONCURRENT freed 973K, 49% free 3689K/7175K, external 2003K/2199K, paused 2ms+2ms
01-13 14:37:54.989: I/MapActivity(27390): Handling network change notification:CONNECTED
01-13 14:37:54.989: E/MapActivity(27390): Couldn't get connection factory client
01-13 14:37:59.933: D/LocationManager(27390): _handleMessage: TYPE_LOCATION_CHANGED
01-13 14:38:01.045: D/dalvikvm(27390): GC_CONCURRENT freed 708K, 46% free 3902K/7175K, external 2009K/2199K, paused 2ms+5ms
01-13 14:38:05.399: V/(PlaceActionActivity)(27390): I'm paused!
01-13 14:38:06.750: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 574K, 44% free 4255K/7495K, external 1182K/1846K, paused 51ms
01-13 14:38:07.741: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 308K, 46% free 4053K/7495K, external 1182K/1182K, paused 32ms
01-13 14:38:07.851: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 45K, 46% free 4047K/7495K, external 2206K/2755K, paused 31ms
01-13 14:38:08.992: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 125K, 46% free 4064K/7495K, external 3230K/3230K, paused 29ms
01-13 14:38:09.102: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 71K, 46% free 4089K/7495K, external 4254K/4254K, paused 29ms
01-13 14:38:10.013: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 228K, 47% free 4082K/7559K, external 6558K/6592K, paused 30ms
01-13 14:38:10.113: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 106K, 46% free 4104K/7559K, external 4741K/5313K, paused 29ms
01-13 14:38:10.233: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 100K, 46% free 4129K/7559K, external 7045K/7199K, paused 29ms
01-13 14:38:11.375: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 252K, 46% free 4100K/7559K, external 8555K/9085K, paused 30ms
01-13 14:38:11.495: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 145K, 46% free 4154K/7559K, external 5739K/5920K, paused 29ms
01-13 14:38:11.585: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 68K, 45% free 4174K/7559K, external 6993K/7455K, paused 29ms
01-13 14:38:11.835: D/dalvikvm(27390): GC_FOR_MALLOC freed 279K, 46% free 4083K/7559K, external 8990K/10012K, paused 28ms
01-13 14:38:12.045: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 61K, 46% free 4093K/7559K, external 3179K/3970K, paused 30ms
01-13 14:38:12.145: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 69K, 46% free 4117K/7559K, external 5227K/5249K, paused 34ms
01-13 14:38:12.255: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 135K, 45% free 4177K/7559K, external 6456K/6847K, paused 35ms
01-13 14:38:12.386: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 166K, 45% free 4215K/7623K, external 9246K/9341K, paused 31ms
01-13 14:38:12.886: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 270K, 46% free 4131K/7623K, external 11524K/11524K, paused 30ms
01-13 14:38:12.996: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 149K, 46% free 4177K/7623K, external 6456K/6847K, paused 30ms
01-13 14:38:13.126: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 166K, 45% free 4216K/7623K, external 9246K/9341K, paused 30ms
01-13 14:38:13.547: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 270K, 46% free 4132K/7623K, external 11524K/11524K, paused 30ms
01-13 14:38:13.667: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 149K, 46% free 4145K/7623K, external 6200K/6847K, paused 30ms
01-13 14:38:13.797: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 134K, 45% free 4214K/7623K, external 8990K/9021K, paused 32ms
01-13 14:38:14.207: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 268K, 46% free 4119K/7623K, external 10500K/11294K, paused 30ms
01-13 14:38:14.348: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 183K, 46% free 4178K/7623K, external 6456K/6528K, paused 31ms
01-13 14:38:14.598: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 166K, 45% free 4217K/7623K, external 9246K/9341K, paused 37ms
01-13 14:38:15.078: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 278K, 46% free 4121K/7623K, external 11524K/11524K, paused 30ms
01-13 14:38:15.188: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 146K, 46% free 4132K/7623K, external 6200K/6847K, paused 43ms
01-13 14:38:15.369: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 166K, 46% free 4170K/7623K, external 8990K/9021K, paused 36ms
01-13 14:38:16.249: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 213K, 47% free 4053K/7623K, external 11218K/11268K, paused 31ms
01-13 14:38:16.390: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 54K, 47% free 4089K/7623K, external 5666K/5910K, paused 30ms
01-13 14:38:17.791: V/(PlaceActivityActivity)(27390): I'm paused!
01-13 14:38:17.841: I/MapActivity(27390): Handling network change notification:CONNECTED
01-13 14:38:17.851: W/IdleConnectionHandler(27390): Removing a connection that never existed!
01-13 14:38:17.851: W/IdleConnectionHandler(27390): Removing a connection that never existed!
01-13 14:38:17.871: V/(PlaceActionActivity)(27390): I'm destroyed!
01-13 14:38:17.871: V/(PlaceActivityActivity)(27390): I'm destroyed!
01-13 14:38:19.222: D/dalvikvm(27390): GC_EXTERNAL_ALLOC freed 197K, 48% free 3983K/7623K, external 4692K/5859K, paused 31ms
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:38:19.292: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:38:19.332: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@4013a5d0,-1,0,-1,0)
01-13 14:38:19.332: I/[POST_RESELECT](27390): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4013d9a0,-1,0,-1,0)
01-13 14:38:19.332: I/[POST_RESELECT](27390): [handleTextChanged] (start,before,after)=(0,0,4)
01-13 14:38:19.332: I/[POST_RESELECT](27390): [handleTextChanged] (start,before,after)=(0,0,3)

我想知道是否有人可以引导我完成这一行:

GC_EXTERNAL_ALLOC freed 574K, 44% free 4255K/7495K, external 1182K/1846K, paused 51ms

4255K/7495K 这个数字告诉我们什么?

最佳答案

最近有人向我指出了一个 Eclipse 插件(在简要浏览之后)似乎在发现内存泄漏方面非常有效。试试 Eclipse Memory Analyzer Open Source Project .您可以单击“设备”选项卡下的“转储 HPROF 文件”DDMS并获取堆信息的信息/图形图表。看起来真的很整洁。

顺便说一句,您质疑的数字似乎是应用程序的可用/容量heap尺寸。 GC_EXTERNAL_ALLOC 在 this post 中有更多描述。 .

关于android - 如何从 Logcat 中的消息日志中检查内存泄漏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8858249/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com