您当前的位置: 首页 >  c++

phymat.nico

暂无认证

  • 1浏览

    0关注

    1967博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

c++内存管理优化之ptmalloc,tcmalloc,jemalloc使用实例

phymat.nico 发布时间:2017-10-18 15:59:19 ,浏览量:1

ptmalloc 是glibc的内存分配管理

tcmalloc 是google的内存分配管理模块

jemalloc 是BSD的提供的内存分配管理

写一段代码测试一下

#include 
#include 
#include 
extern "C"
{
#include "jemalloc.h"
}
#include 
#include 
using namespace std;
int main()
{
    char *buff = new char[32];
lab_beg:
    clock_t begin = clock();
    int i = 0;
    for(i=0;i            
关注
打赏
1659628745
查看更多评论
0.0487s