zoukankan      html  css  js  c++  java
  • valgrind leakcheck=full showreachable=yes logfile=a.log ./shdaily.fcgi "op=search&date=20110414

    valgrind --leak-check=full  --show-reachable=yes  --log-file=a.log ./shdaily.fcgi "op=search&date=2011-04-14&current=4"

    glib使用如下:

    G_SLICE=always-malloc valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20  ./egg2Utest "ItfTest"

    常用命令详解:

    G_DEBUG=gc-friendly

    G_SLICE=always-malloc     //glib有缓存  故需使用

    上述两条设置环境变量 G_SLICE和G_DEBUG排除由内存分配机制带来的影响

    --tool=memcheck     //使用valgrind的memcheck功能

    -show-reachable=yes    //是否检测控制范围之外的泄漏,比如全局指针、static指针等

    --log-file=a.log      //结果输出到文件

    --leak-check=full      //显示具体代码中泄漏的地方

    --leak-resolution=high     //

    --num-callers=20

    严格通用

    G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --show-reachable=yes --log-file=a.log  ./app

  • 相关阅读:
    数据库删除Push
    MFC Tab Control控件的详细使用
    mysql char和varchar的长度
    PostgreSQL常用脚本
    Linux常用操作命令
    PostgreSQL杀掉会话
    PostgresSQL备份还原
    Grpc客户端添加请求头(Header)
    Polly重试
    名词探疑3:I18N,L10N,A11Y
  • 原文地址:https://www.cnblogs.com/wangkangluo1/p/2077450.html
Copyright © 2011-2022 走看看