android ion 内存泄漏排查

本文介绍了如何通过/sys/kernel/debug/ion/heaps来查看系统中各进程的ION内存使用情况,包括分配给surfaceflinger、fb等客户端的内存大小及孤儿分配信息,并展示了如何检查特定进程对缓冲区的引用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.查看各个进程的ION

:/sys/kernel/debug/ion/heaps # cat system-heap
cat system-heap
          client              pid             size
----------------------------------------------------
  surfaceflinger              211          6565888
  surfaceflinger              211         50413568
           fb                1         32538624
----------------------------------------------------
orphaned allocations (info is from last known client):
  surfaceflinger              211          7864320 0 1
----------------------------------------------------
  total orphaned          7864320
          total          90009600
   deferred free                0
----------------------------------------------------
0 order 8 highmem pages in pool = 0 total
27 order 8 lowmem pages in pool = 28311552 total
0 order 4 highmem pages in pool = 0 total
8 order 4 lowmem pages in pool = 524288 total
0 order 0 highmem pages in pool = 0 total
4 order 0 lowmem pages in pool = 16384 total

2.每个进程对这个buffer的引用情况:

   cat /proc/进程号/fd

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值