Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RyanQinqhw opened this issue Feb 15, 2023 · 0 comments
Open

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

RyanQinqhw opened this issue Feb 15, 2023 · 0 comments

Comments

@RyanQinqhw
Copy link

RyanQinqhw commented Feb 15, 2023

`+ (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, 就不能开启大块内存监控

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant