Pyjamas
V2EX  ›  macOS

大家的 valgrind 在 macOS 下能用吗

  •  
  •   Pyjamas · Sep 26, 2017 · 2943 views
    This topic created in 3154 days ago, the information mentioned may be changed or developed.

    我的 macOS 版本 10.12.6,valgrind 版本 3.13.0,写个 C 程序比如

    int main() {
    
    }
    

    照样能检测的内存泄漏

    ==19130== LEAK SUMMARY:
    ==19130==    definitely lost: 408 bytes in 8 blocks
    ==19130==    indirectly lost: 6,888 bytes in 8 blocks
    ==19130==      possibly lost: 72 bytes in 3 blocks
    ==19130==    still reachable: 32 bytes in 1 blocks
    

    大家的 valgrind 能用吗,还是在 macOS 下用别的内存泄漏检测工具?

    2 replies    2017-09-26 20:23:28 +08:00
    oIMOo
        1
    oIMOo  
       Sep 26, 2017 via iPhone
    一直这样。习惯就好。
    你写个故意含泄漏的,对比一下,知道差别以后就容易看出来了。
    Pyjamas
        2
    Pyjamas  
    OP
       Sep 26, 2017
    @oIMOo 好的,谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2860 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:23 · PVG 20:23 · LAX 05:23 · JFK 08:23
    ♥ Do have faith in what you're doing.