CPU raises with attributesOfItemAtPath:error:

后端 未结 2 769
渐次进展
渐次进展 2021-01-15 14:18

I am using [NSFileManager attributesOfItemAtPath:error:] function for fetching attributes of file. But sometimes my application cpu is going upto 100%. I am usi

相关标签:
2条回答
  • 2021-01-15 14:56

    I am using stat.

    #import <sys/stat.h>
    
    struct stat stat1;
    if( stat([inFilePath fileSystemRepresentation], &stat1) )
          // something is wrong 
    long long size = stat1.st_size;
    printf("Size: %lld\n", stat1.st_size);
    
    0 讨论(0)
  • 2021-01-15 15:03
    • SYSENTER is a companion instruction to SYSEXIT. The trap is a subset of a thread’s complete context. So, the trap frame keeps information about the current thread context so it could restore it with SYSEXIT instruction.

    Link about Sysenter_traps.

    It seems that you are overloading your main thread. Thats why Cpu is on 100%

    0 讨论(0)
提交回复
热议问题