Permalink
Browse files

* 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.
  • Loading branch information...
1 parent 4893e6a commit 39554cec0d3b6a51a718b1600c2a7c7f6b23fc79 @funny-falcon committed Sep 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 st.c
View
@@ -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))

0 comments on commit 39554ce

Please sign in to comment.