(1)指定参数:
make MALLOC=libc
(2)安装jemalloc:jemalloc干了malloc干的活,而且干得好一些,主要体现在避免内存碎片与并发扩展上。
下载jemalloc:
https://github.com/jemalloc/jemalloc/releases
2.编译安装:
./configure --prefix=/usr/local/jemalloc && make && make install
3.添加链接:
echo /usr/local/jemalloc/lib >> /etc/ld.so.conf
4.刷新库:
ldconfig
编译redis时报错zmalloc.h:50:31: 错误:jemalloc/jemalloc.h:
原文:http://blog.51cto.com/xvjunjie/2071671