summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc/chromium/src/packed-cache-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/tcmalloc/chromium/src/packed-cache-inl.h')
-rw-r--r--third_party/tcmalloc/chromium/src/packed-cache-inl.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/third_party/tcmalloc/chromium/src/packed-cache-inl.h b/third_party/tcmalloc/chromium/src/packed-cache-inl.h
index 9d2cfe3..77f42b6 100644
--- a/third_party/tcmalloc/chromium/src/packed-cache-inl.h
+++ b/third_party/tcmalloc/chromium/src/packed-cache-inl.h
@@ -112,10 +112,11 @@
#define TCMALLOC_PACKED_CACHE_INL_H_
#include "config.h"
+#include <stddef.h> // for size_t
#ifdef HAVE_STDINT_H
-#include <stdint.h>
+#include <stdint.h> // for uintptr_t
#endif
-#include "base/basictypes.h" // for COMPILE_ASSERT
+#include "base/basictypes.h"
#include "internal_logging.h"
// A safe way of doing "(1 << n) - 1" -- without worrying about overflow
@@ -134,7 +135,12 @@ class PackedCache {
public:
typedef uintptr_t K;
typedef size_t V;
+#ifdef TCMALLOC_SMALL_BUT_SLOW
+ // Decrease the size map cache if running in the small memory mode.
static const int kHashbits = 12;
+#else
+ static const int kHashbits = 16;
+#endif
static const int kValuebits = 7;
static const bool kUseWholeKeys = kKeybits + kValuebits <= 8 * sizeof(T);