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

Unified Diff: third_party/tcmalloc/chromium/src/maybe_threads.cc

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
Index: third_party/tcmalloc/chromium/src/maybe_threads.cc
diff --git a/third_party/tcmalloc/chromium/src/maybe_threads.cc b/third_party/tcmalloc/chromium/src/maybe_threads.cc
index 15c8a23dcb3509549ef6b45531f2418e988a3cf5..80a07402e908d52383665ebb9d4279246d1eb320 100644
--- a/third_party/tcmalloc/chromium/src/maybe_threads.cc
+++ b/third_party/tcmalloc/chromium/src/maybe_threads.cc
@@ -120,7 +120,10 @@ int perftools_pthread_once(pthread_once_t *ctl,
pthread_once_ran_before_threads = true;
return 0;
}
-#endif
+#elif defined(__ANDROID__)
+ // Android >= 2.3 (GB) always implement pthread_once.
+ return pthread_once(ctl, init_routine);
+#else
if (pthread_once) {
return pthread_once(ctl, init_routine);
} else {
@@ -130,4 +133,5 @@ int perftools_pthread_once(pthread_once_t *ctl,
}
return 0;
}
+#endif
}
« no previous file with comments | « third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h ('k') | third_party/tcmalloc/chromium/src/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698