summaryrefslogtreecommitdiff
path: root/deps/jemalloc
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-07-24 10:15:04 +0200
committerantirez <antirez@gmail.com>2015-07-24 10:20:02 +0200
commit6b836b6b4148a3623e35807e998097865b9ebb3a (patch)
tree4a0386ecd7550e000bddb8e86c96429b26a47f2e /deps/jemalloc
parent64fcd0e6ff1f7a6b85f5432767a298a95eacfe00 (diff)
downloadredis-6b836b6b4148a3623e35807e998097865b9ebb3a.tar.gz
Jemalloc: use LG_QUANTUM of 3 for AMD64 and I386.
This gives us a 24 bytes size class which is dict.c dictEntry size, thus improving the memory efficiency of Redis significantly. Moreover other non 16 bytes aligned tiny classes are added that further reduce the fragmentation of the allocator. Technically speaking LG_QUANTUM should be 4 on i386 / AMD64 because of SSE types and other 16 bytes types, however we don't use those, and our jemalloc only targets Redis. New versions of Jemalloc will have an explicit configure switch in order to specify the quantum value for a platform without requiring any change to the Jemalloc source code: we'll switch to this system when available. This change was originally proposed by Oran Agra (@oranagra) as a change to the Jemalloc script to generate the size classes define. We ended doing it differently by changing LG_QUANTUM since it is apparently the supported Jemalloc method to obtain a 24 bytes size class, moreover it also provides us other potentially useful size classes. Related to issue #2510.
Diffstat (limited to 'deps/jemalloc')
-rw-r--r--deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
index 574bbb141..df266abb7 100644
--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
@@ -242,7 +242,7 @@ static const bool config_ivsalloc =
*/
#ifndef LG_QUANTUM
# if (defined(__i386__) || defined(_M_IX86))
-# define LG_QUANTUM 4
+# define LG_QUANTUM 3
# endif
# ifdef __ia64__
# define LG_QUANTUM 4
@@ -254,7 +254,7 @@ static const bool config_ivsalloc =
# define LG_QUANTUM 4
# endif
# if (defined(__amd64__) || defined(__x86_64__) || defined(_M_X64))
-# define LG_QUANTUM 4
+# define LG_QUANTUM 3
# endif
# ifdef __arm__
# define LG_QUANTUM 3