Comments (7)
我也是遇到和你同样的问题,不知道你有没有找到解决方法
from oomdetector.
刚刚发现是如果直接模拟内存暴增弄到crash,就会出现真正的crash日志了
from oomdetector.
确实。在内存达到设定峰值就出线日志了
from oomdetector.
必须要出现内存触顶后才会有日志
from oomdetector.
@rosen0510 谢谢,了解了。
from oomdetector.
求教,我模拟了内存爆增的crash,但是导出来的log仍然是0000的 524KB大小的文件,不知道哪里出了问题,这是我的配置:
` OOMDetector *detector = [OOMDetector getInstance];
[detector setupWithDefaultConfig];
[detector startMaxMemoryStatistic:100*1024*1024];
[detector setFileDataDelegate:nil];
[detector setPerformanceDataDelegate:nil];
[detector startSingleChunkMallocDetector:50*1024*1024 callback:^(size_t bytes, NSString *stack) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"大内存分配检测" message:stack preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:cancel];
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
}];
[detector startMallocStackMonitor:1*1024*1024 needAutoDumpWhenOverflow:YES dumpLimit:100*1024*1024 sampleInterval:0.1];
[detector showMemoryIndicatorView:DEBUG]; `
from oomdetector.
求教,我模拟了内存爆增的crash,但是导出来的log仍然是0000的 524KB大小的文件,不知道哪里出了问题,这是我的配置:
` OOMDetector *detector = [OOMDetector getInstance];
[detector setupWithDefaultConfig]; [detector startMaxMemoryStatistic:100*1024*1024]; [detector setFileDataDelegate:nil]; [detector setPerformanceDataDelegate:nil]; [detector startSingleChunkMallocDetector:50*1024*1024 callback:^(size_t bytes, NSString *stack) { UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"大内存分配检测" message:stack preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:nil]; [alert addAction:cancel]; [self.window.rootViewController presentViewController:alert animated:YES completion:nil]; }]; [detector startMallocStackMonitor:1*1024*1024 needAutoDumpWhenOverflow:YES dumpLimit:100*1024*1024 sampleInterval:0.1]; [detector showMemoryIndicatorView:DEBUG]; `
看了下源码,我发现是我配置的原因导致日志没有写入,dumplimit的单位是mb,改小了数值后能在log中看到日志了,但是日志如图:
请问这个日志是正确的吗?堆栈转写生成的文件体积是0K。。。
from oomdetector.
Related Issues (20)
- malloc: Attempted to register zone more than once
- 建议注释podspec引用的图片资源
- vector not found
- 关于OOMDetector更新的几点建议 HOT 7
- app使用内存计算的与xcode计算的不一致 HOT 2
- 关于内存泄漏检测的疑问
- 针对mmap生成的文件能否支持解析
- 野指针crash HOT 4
- oomgif.gif 这个gif有8MB,不移除吗?
- demo
- demo crash HOT 4
- 内存泄漏的堆栈解析后为空文件咋回事啊 HOT 1
- 项目中有多个fishhook的时候,#import "fishhook.h"不合适,最好使用#import <fishhook/fishhook.h> HOT 1
- this is a crash , "exp_reason" : "*** -[NSPlaceholderString initWithUTF8String:]: NULL cString",
- 为什么无法检测到OC对象的内存泄漏?
- 无法打包发布 HOT 2
- 关于私有api使用线上问题 HOT 3
- 根据文档的说明,沙盒中没找到.log的文件 HOT 4
- __syscall_logger 为什么是 私有 API,逻辑不应该和malloc_logger 一致吗?
- 感觉这个的知名度不如MLeaksFinder啊
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oomdetector.