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

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

Issue 14321006: Adds TCMalloc support for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/getpc.h
diff --git a/third_party/tcmalloc/chromium/src/getpc.h b/third_party/tcmalloc/chromium/src/getpc.h
index 9fb2e162beb22621406918ec017f2dd3bc2ea073..7c84ad9f539817fbd8679de40ada7598881015c7 100644
--- a/third_party/tcmalloc/chromium/src/getpc.h
+++ b/third_party/tcmalloc/chromium/src/getpc.h
@@ -171,12 +171,19 @@ inline void* GetPC(const struct ucontext_t& signal_ucontext) {
RAW_LOG(ERROR, "GetPC is not yet implemented on Windows\n");
return NULL;
}
-
+#elif defined(__ANDROID__)
+typedef int ucontext_t;
+inline void* GetPC(const ucontext_t& signal_ucontext) {
+ // Bionic doesn't export ucontext, see
+ // https://code.google.com/p/android/issues/detail?id=34784.
+ return NULL;
+}
+#else
+//
// Normal cases. If this doesn't compile, it's probably because
// PC_FROM_UCONTEXT is the empty string. You need to figure out
// the right value for your system, and add it to the list in
// configure.ac (or set it manually in your config.h).
-#else
inline void* GetPC(const ucontext_t& signal_ucontext) {
return (void*)signal_ucontext.PC_FROM_UCONTEXT; // defined in config.h
}

Powered by Google App Engine
This is Rietveld 408576698