android:此进程的外部分配太大 - 在哪里?
我收到以下错误消息:
07-13 11:02:05.519: ERROR/dalvikvm-heap(1605): 290314-byte external allocation too large for this process.
07-13 11:02:05.519: ERROR/(1605): VM won't let us allocate 290314 bytes
07-13 11:02:05.549: ERROR/dalvikvm-heap(1605): 292612-byte external allocation too large for this process.
07-13 11:02:05.549: ERROR/(1605): VM won't let us allocate 292612 bytes
有什么方法可以追溯或获取堆栈跟踪或显示尝试进行分配的位置的内容吗?
I am getting the following error messages:
07-13 11:02:05.519: ERROR/dalvikvm-heap(1605): 290314-byte external allocation too large for this process.
07-13 11:02:05.519: ERROR/(1605): VM won't let us allocate 290314 bytes
07-13 11:02:05.549: ERROR/dalvikvm-heap(1605): 292612-byte external allocation too large for this process.
07-13 11:02:05.549: ERROR/(1605): VM won't let us allocate 292612 bytes
Is there any way to trace that back or get a stack trace or something that will show where that allocation is attempting to be made?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然,在可疑代码周围放置一个 try/catch 块,确保捕获
Error e
,而不是Exception e
,然后捕获e.printStackTrace();在catch中。
Sure, put a try/catch block around the suspected code, making sure to catch
Error e
, notException e
, thene.printStackTrace();
in the catch.您可以使用分配跟踪器实用程序。查看这篇文章:
http://developer.android.com/tools/debugging/ ddms.html#alloc
You can use the Allocation Tracker utility. Check out this article:
http://developer.android.com/tools/debugging/ddms.html#alloc