Thanks to visit codestin.com
Credit goes to github.com

Skip to content

开启大块内存监控有问题啊,开启不了啊 #79

@RyanQinqhw

Description

@RyanQinqhw

`+ (void)startSingleChunkMallocTracer {
if ([MTHAllocations shared].isLoggingOn)
return;

[[MTHAllocations shared]
    startSingleChunkMallocDetector:[MTHawkeyeUserDefaults shared].chunkMallocThresholdInBytes
                          callback:^(size_t bytes, vm_address_t *_Nonnull stack_frames, size_t frames_count) {
                              MTHLogInfo(@"chunk malloc:%.2fmb stack: ", bytes / 1024 / 1024.f);
                          }];

MTHLogInfo(@"allocations single chunk malloc start");

}`

if ([MTHAllocations shared].isLoggingOn) /// 这块判断有问题,开启了log, 就不能开启大块内存监控

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions