Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: third_party/tcmalloc/chromium/src/packed-cache-inl.h

Issue 7050034: Merge google-perftools r109 (the current contents of third_party/tcmalloc/vendor) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/packed-cache-inl.h
===================================================================
--- third_party/tcmalloc/chromium/src/packed-cache-inl.h (revision 87277)
+++ third_party/tcmalloc/chromium/src/packed-cache-inl.h (working copy)
@@ -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 @@
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);

Powered by Google App Engine
This is Rietveld 408576698