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

Unified Diff: third_party/tcmalloc/chromium/src/tests/memalign_unittest.cc

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, 6 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/tests/memalign_unittest.cc
===================================================================
--- third_party/tcmalloc/chromium/src/tests/memalign_unittest.cc (revision 88335)
+++ third_party/tcmalloc/chromium/src/tests/memalign_unittest.cc (working copy)
@@ -49,6 +49,7 @@
#include <unistd.h> // for getpagesize()
#endif
#include "tcmalloc.h" // must come early, to pick up posix_memalign
+#include <assert.h>
#include <stdlib.h> // defines posix_memalign
#include <stdio.h> // for the printf at the end
#ifdef HAVE_STDINT_H
@@ -57,8 +58,13 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> // for getpagesize()
#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
+// Malloc can be in several places on older versions of OS X.
+#if defined(HAVE_MALLOC_H)
+#include <malloc.h> // for memalign() and valloc()
+#elif defined(HAVE_MALLOC_MALLOC_H)
+#include <malloc/malloc.h>
+#elif defined(HAVE_SYS_MALLOC_H)
+#include <sys/malloc.h>
#endif
#include "base/basictypes.h"
#include "base/logging.h"
« no previous file with comments | « third_party/tcmalloc/chromium/src/tests/malloc_hook_test.cc ('k') | third_party/tcmalloc/chromium/src/tests/page_heap_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698