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

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

Issue 10818025: tcmalloc: move includes for mallinfo from tcmalloc.cc to tcmalloc.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tcmalloc instead Created 8 years, 5 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
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/tcmalloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h
diff --git a/third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h b/third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h
index 7c889170bade4ae356fb7c391c2aa0d328af823d..a3f036fec52823fb523753d98771eaba45200525 100644
--- a/third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h
+++ b/third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h
@@ -53,7 +53,17 @@
#define TC_VERSION_PATCH ""
#define TC_VERSION_STRING "gperftools 2.0"
-#include <stdlib.h> // for struct mallinfo, if it's defined
+// For struct mallinfo, it it's defined.
+#ifdef HAVE_STRUCT_MALLINFO
Nico 2012/07/24 16:37:10 HAVE_STRUCT_MALLINFO etc are defined in third_part
+// Malloc can be in several places on older versions of OS X.
+# if defined(HAVE_MALLOC_H)
+# include <malloc.h>
+# elif defined(HAVE_SYS_MALLOC_H)
+# include <sys/malloc.h>
+# elif defined(HAVE_MALLOC_MALLOC_H)
+# include <malloc/malloc.h>
+# endif
+#endif
// Annoying stuff for windows -- makes sure clients can import these functions
#ifndef PERFTOOLS_DLL_DECL
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/tcmalloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698