Multimedia memory

Multimedia memory guideline

  • Multimedia related app has more chances to allocate multimedia memory directly or indirectly such as camera, album, VideoHighlight, video player, music player. For example, VideoHighlight gets memory buffer from mediaserver and the buffer is allocated from ION(in QCT platform) or NVMAP(in NV platform) by mediaserver. In this case, the additional multimedia memory usage should be counted into VideoHighlight’s memory usage since the additional multimedia memory usage doesn’t be counted into any process’ memory usage.
  • Multimedia memory usage should also be counted into app’s memory usage and app’s overall memory usage including multimedia memory usage should meet defined memory budget.

QCT/MTK platform (ION)

2.1 ION memory manager

  • ION is a generalized memory manager that Google introduced in the Android 4.0 ICS release to address the issue of fragmented memory management interfaces across different Android devices.

2.2 How to measure ION memory usage

  • IonInUse: summary of all currently used ION memory
  • IonTotal: IonInUse plus none-used ION memory pool(memory cache for improving ION allocation performance)
  • Compare the difference of “IonInUse” value by below command
    adb shell cat /proc/meminfo | grep IonInUse
    这里写图片描述
    ## 2.3 How to breakdown ION memory usage ##
    For QCT platform
  • Check the allocation breakdown by below command
    adb shell cat /sys/kernel/debug/ion/heaps/system
    这里写图片描述
    For MTK platform
  • Check the allocation breakdown by below command
adb shell cat /sys/kernel/debug/ion/heaps/ion_mm_heap

这里写图片描述

3 NV platform (NVMAP)

3.1 NVMAP

  • Nvmap is nvidia’s memory management driver. It handles memory allocation/free/handle exchange.

3.2 How to measure NVMAP memory usage

  • Compare the difference of “total” value by below command
adb shell cat /sys/kernel/debug/nvmap/iovmm/clients

这里写图片描述

3.3 How to breakdown NVMAP memory usage

  • Check the allocation breakdown by below command
adb shell cat /sys/kernel/debug/nvmap/iovmm/allocations

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值