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

Unified Diff: third_party/tcmalloc/chromium/src/gperftools/malloc_hook.h

Issue 9311003: Update the tcmalloc chromium branch to r144 (gperftools 2.0), and merge chromium-specific changes. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebasec Created 8 years, 10 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/gperftools/malloc_hook.h
diff --git a/third_party/tcmalloc/chromium/src/google/malloc_hook.h b/third_party/tcmalloc/chromium/src/gperftools/malloc_hook.h
similarity index 97%
copy from third_party/tcmalloc/chromium/src/google/malloc_hook.h
copy to third_party/tcmalloc/chromium/src/gperftools/malloc_hook.h
index f5575f13999f267d2351bdb29bbf228aec205193..673a3f36c198436de23b2d528c0d0e244586a07f 100644
--- a/third_party/tcmalloc/chromium/src/google/malloc_hook.h
+++ b/third_party/tcmalloc/chromium/src/gperftools/malloc_hook.h
@@ -69,7 +69,7 @@
#include <stddef.h>
#include <sys/types.h>
extern "C" {
-#include <google/malloc_hook_c.h> // a C version of the malloc_hook interface
+#include <gperftools/malloc_hook_c.h> // a C version of the malloc_hook interface
}
// Annoying stuff for windows -- makes sure clients can import these functions
@@ -81,6 +81,14 @@ extern "C" {
# endif
#endif
+// The C++ methods below call the C version (MallocHook_*), and thus
+// convert between an int and a bool. Windows complains about this
+// (a "performance warning") which we don't care about, so we suppress.
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4800)
+#endif
+
// Note: malloc_hook_c.h defines MallocHook_*Hook and
// MallocHook_{Add,Remove}*Hook. The version of these inside the MallocHook
// class are defined in terms of the malloc_hook_c version. See malloc_hook_c.h
@@ -342,4 +350,9 @@ class PERFTOOLS_DLL_DECL MallocHook {
static void InvokeSbrkHookSlow(const void* result, std::ptrdiff_t increment);
};
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+
#endif /* _MALLOC_HOOK_H_ */

Powered by Google App Engine
This is Rietveld 408576698