zoukankan      html  css  js  c++  java
  • 安装redis时Newer version of jemalloc required错误解决

    问题:

    [root@localhost redis-4.0.0]# make 

    cd src && make all
    make[1]: Entering directory `/root/data/redis-4.0.0/src'
    CC Makefile.dep
    make[1]: Leaving directory `/root/data/redis-4.0.0/src'
    make[1]: Entering directory `/root/data/redis-4.0.0/src'
    CC adlist.o
    In file included from adlist.c:34:
    zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
    zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
    make[1]: *** [adlist.o] Error 1
    make[1]: Leaving directory `/root/data/redis-4.0.0/src'
    make: *** [all] Error 2

    解决方法:

    # cd deps/

    # make hiredis jemalloc linenoise lua geohash-int

    #cd ..

    #make

    不要使用这样的解决方式:make MALLOC=libc

    原因(摘自:http://www.jb51.net/article/100575.htm):

    于tcmalloc,jemalloc和libc对应的三个内存分配器。其性能和碎片率如何呢?

    下面是一个简单测试结果,使用Redis自带的redis-benchmark写入等量数据进行测试,数据摘自采用不同分配器时Redis info信息。

    我们可以看到,采用tcmalloc时碎片率是最低的,为1.01,jemalloc为1.02,而libc的分配器碎片率为1.31,

  • 相关阅读:
    event事件对象
    移动端布局模式
    事件冒泡和事件捕获
    移动web缓存介绍 ---摘录
    this的运用
    第一次演讲准备篇--css
    jquery内部技术分析
    java 编程思想笔记(五)——接口
    java 编程思想笔记(四)——多态
    java 编程思想笔记(三)——类的复用
  • 原文地址:https://www.cnblogs.com/Sandheart/p/7205249.html
Copyright © 2011-2022 走看看