从cobalt memory docs中,我们将max_cobalt_cpu_usage
limit设置为250M,max_cobalt_gpu_usage
到150M,发现cobalt实际使用的最大内存约为370M,播放4K视频约12小时,超过250M很多,那么什么样的内存(例如.malloc /new/mmap等)计入max_cobalt_cpu_usage
? 如何设置max_cobalt_cpu_usage
并将实际内存使用量保持在max_cobalt_cpu_usage
?
PS.The memory statistical approach is as follows:
1>Move focus to the cobalt icon, drop the memory cache, record the memory free value(memoryBegin) from /proc/meminfo;
2>Enter cobalt youtube, and keep playing 4K videos for about 12 hours;
3>During playing the videos, record the memory free value(memoryEnd) from /proc/meminfo every 10s(drop the memory cache before record the memory);
4>Find the minimum memoryEnd as memoryEndMin;
5>memoryBegin - memoryEndMin = 370M;