剑指漠北

Results 14 comments of 剑指漠北

请参考下:在夜神模拟器上跑armeabi-v7a包相关问题咨询 #91

请参考下:在夜神模拟器上跑armeabi-v7a包相关问题咨询 #91

> Android 6级以上 "dalvik.vm.heapsize" property值不大于(大多数都为小于)虚拟机堆内存大小。 这个是实际测试得到的结论吗?从源码看应该dalvik.vm.heapsize就是对应Heap的capacity_的吧 实际测试得出的结论: 比如: Android 6.0 VIVO Y67A型号 vmHeapSize: 268435456, actual_space1: 134217728, actual_space2: 134217728 Android 6.0 SONY F3111型号 vmHeapSize: 268435456, actual_space1: 134217728, actual_space2: 134217728 Android 7.0...

> > > Android 6级以上 "dalvik.vm.heapsize" property值不大于(大多数都为小于)虚拟机堆内存大小。 这个是实际测试得到的结论吗?从源码看应该dalvik.vm.heapsize就是对应Heap的capacity_的吧 > > > > > > 实际测试得出的结论: 比如: Android 6.0 VIVO Y67A型号 vmHeapSize: 268435456, actual_space1: 134217728, actual_space2: 134217728 > > Android 6.0...

今天想到一个简单方法:将泄漏的地方进行UnregisterAlloc+free操作,可解决此问题。 https://github.com/KwaiAppTeam/KOOM/blob/a5430e2db995fb67435936bb2bddf1b42f690578/koom-native-leak/src/main/jni/src/leak_monitor.cpp#L209 修改为 ``` freeMonitor(reinterpret_cast(CONFUSE(live->address))); ``` 拿一次new std::string("test_leak_string -- test_leak_string");作为样本进行测试 ``` I/KOOM: OnMonitor address:0x7e86c53020 size:24 I/KOOM: RegisterAlloc address:0x7e86c53020 size:24 I/KOOM: OnMonitor address:0x7e86f1ce20 size:48 I/KOOM: RegisterAlloc address:0x7e86f1ce20 size:48 I/NativeLeakTest: TestNewLeak 0x7e86c53020...

> 直接释放掉内存并不好吧,是否leak的判断也不一定准确,作为工具直接释放掉用户的内存,等用户使用的时候会野指针或者直接crash,我觉得宁愿释放掉自身的记录堆栈也比直接释放用户内存要好。 (1)内存泄漏检测并能保证100%正确,线上检测出来的仍需要人工确认。 (2)检测工具不该擅自动用户空间的内存。 感谢🙏

> Thank you for the PR. > > I tested on a OnePlus 7 Pro on Android 11, which shows a black screen for new displays on scrcpy 3.1. With...

I open Developer options-Simulate secondary displays and Developer options-Force desktop mode. The OVERLAY display shows as follows: ![image](https://github.com/user-attachments/assets/47a782ce-2aad-4b6b-aafa-3655b380ac39) It has secondary home、navigationbar、background or wallpaper, so I want to start the...

> 这个方案在android 9以下不行,大佬针对android 9及以下,采用的是什么方案。 Android 9及以下不支持使用linker方式,所以将so从apk中解压出来,再通过普通方式启动 请参考:https://github.com/shiqos/xCrash/pull/1