From 39554cec0d3b6a51a718b1600c2a7c7f6b23fc79 Mon Sep 17 00:00:00 2001 From: Sokolov Yura 'funny-falcon Date: Tue, 11 Sep 2012 11:31:25 +0400 Subject: [PATCH] * st.c: set packed size same as second table size It seems that tcmalloc and jemalloc suffers from difference from ST_DEFAULT_PACKET_TABLE_SIZE and ST_DEFAULT_SECOND_TABLE_SIZE on 64bit platform, cause 18*8 and 19*8 fall into the different allocation buckets. It is not an issue on 32bit platform though. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 91fcb7bc7a5a81..daf0d462866fc6 100644 --- a/st.c +++ b/st.c @@ -35,7 +35,7 @@ typedef struct st_packed_entry { #define ST_DEFAULT_MAX_DENSITY 5 #define ST_DEFAULT_INIT_TABLE_SIZE 11 #define ST_DEFAULT_SECOND_TABLE_SIZE 19 -#define ST_DEFAULT_PACKED_TABLE_SIZE 18 +#define ST_DEFAULT_PACKED_TABLE_SIZE 19 #define PACKED_UNIT (int)(sizeof(st_packed_entry) / sizeof(st_table_entry*)) #define MAX_PACKED_HASH (int)(ST_DEFAULT_PACKED_TABLE_SIZE * sizeof(st_table_entry*) / sizeof(st_packed_entry))