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;
    }
  • 相关阅读:
    win7与centos虚拟机的共享文件夹创建
    MySQL视图
    MySQL分区表与合并表
    PHP读写XML文件的四种方法
    备份与恢复
    MySQL日志
    MySQL锁问题
    优化数据库对象
    ActiveReport资料
    对ArrayList 进行深拷贝
  • 原文地址:https://www.cnblogs.com/osbreak/p/9209888.html
Copyright © 2011-2022 走看看