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

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

Issue 14321006: Adds TCMalloc support for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always use phtread_once Created 7 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
« no previous file with comments | « third_party/tcmalloc/chromium/src/getpc.h ('k') | third_party/tcmalloc/chromium/src/maybe_threads.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h
diff --git a/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h b/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h
index 070ebf72aac92304c195dc08b4c563f42589190e..3b858caa444261e5d36e6586fb3f39eb46c29907 100644
--- a/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h
+++ b/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h
@@ -53,11 +53,18 @@
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn)))
-void* operator new(size_t size) throw (std::bad_alloc)
+#if defined(__ANDROID__)
+// Android's bionic doesn't have std::bad_alloc.
+#define STD_BAD_ALLOC
+#else
+#define STD_BAD_ALLOC std::bad_alloc
+#endif
+
+void* operator new(size_t size) throw (STD_BAD_ALLOC)
ALIAS(tc_new);
void operator delete(void* p) __THROW
ALIAS(tc_delete);
-void* operator new[](size_t size) throw (std::bad_alloc)
+void* operator new[](size_t size) throw (STD_BAD_ALLOC)
ALIAS(tc_newarray);
void operator delete[](void* p) __THROW
ALIAS(tc_deletearray);
« no previous file with comments | « third_party/tcmalloc/chromium/src/getpc.h ('k') | third_party/tcmalloc/chromium/src/maybe_threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698