Giter VIP home page Giter VIP logo

Comments (7)

wuzhangping avatar wuzhangping commented on May 14, 2024

我也是遇到和你同样的问题,不知道你有没有找到解决方法

from oomdetector.

wuzhangping avatar wuzhangping commented on May 14, 2024

刚刚发现是如果直接模拟内存暴增弄到crash,就会出现真正的crash日志了

from oomdetector.

Virtue86 avatar Virtue86 commented on May 14, 2024

确实。在内存达到设定峰值就出线日志了

from oomdetector.

rosen0510 avatar rosen0510 commented on May 14, 2024

必须要出现内存触顶后才会有日志

from oomdetector.

Xwoder avatar Xwoder commented on May 14, 2024

@rosen0510 谢谢,了解了。

from oomdetector.

HePingLaoSan avatar HePingLaoSan commented on May 14, 2024

求教,我模拟了内存爆增的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.

HePingLaoSan avatar HePingLaoSan commented on May 14, 2024

求教,我模拟了内存爆增的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中看到日志了,但是日志如图:
image
请问这个日志是正确的吗?堆栈转写生成的文件体积是0K。。。

from oomdetector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.