zoukankan      html  css  js  c++  java
  • gperftools::TCMalloc

    VS2013编译gperftools-2.4

    1)https://github.com/gperftools/gperftools  下载   gperftools-2.4.zip  版本。
    2)解压 gperftools-2.4.zip,保留Debug,src,vsprojects文件夹 及gperftools.sln工程文件,其他删除。
    3)vsprojects 文件夹下,只保留libtcmalloc_minimal文件夹,其他文件夹删除。
    4)编译项目动态库libtcmalloc_minimal.dll

    vs2013工程Vc++  目录-》包含目录中  
    添加 ../gperftools-gperftools-2.4/src/windows/gperftools
    在连接-》输入-》 中
    添加libtcmalloc_minimal-debug.lib 
     在stdafx.h中添加
    
     //使用tcmalloc分配器
     #define USE_TCMALLOC_LIB
     #ifdef USE_TCMALLOC_LIB
     #include "tcmalloc.h"
     #endif // USE_TCMALLOC_LI
     在项目app中测试调用是否成功
    int main(int argc, char* argv[])
    {
       const char* tcVer = tc_version(NULL, NULL, NULL);
      if (NULL != tcVer)
             printf("%s 
    ", tcVer);
      
       return 0;
    }
  • 相关阅读:
    统计代码行数
    梯度下降算法
    multiplot 安装与配置
    ros 源码安装
    cmake 指定gcc/g++版本
    python 科学计算基础库安装
    协方差矩阵的含义
    pysvn 相关
    void 0与undefined
    BEM规范
  • 原文地址:https://www.cnblogs.com/osbreak/p/9209888.html
Copyright © 2011-2022 走看看