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

Unified Diff: base/process_util_linux.cc

Issue 15405003: add a macro that really identifies glibc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nitpick fixup 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 | « no previous file | build/build_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_linux.cc
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index 2c2824fd77db68da521883918bc88b580e99caa2..898c1720696d3263aa0bd422bd536415df61e748 100644
--- a/base/process_util_linux.cc
+++ b/base/process_util_linux.cc
@@ -745,10 +745,11 @@ void OnNoMemory() {
} // namespace
-#if !defined(OS_ANDROID) && !defined(USE_TCMALLOC) && \
- !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
+#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
!defined(THREAD_SANITIZER)
+#if defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
+
extern "C" {
void* __libc_malloc(size_t size);
void* __libc_realloc(void* ptr, size_t size);
@@ -826,7 +827,14 @@ int posix_memalign(void** ptr, size_t alignment, size_t size) {
}
} // extern C
-#endif // ANDROID, TCMALLOC, *_SANITIZER
+
+#else
+
+// TODO(mostynb@opera.com): dlsym dance
+
+#endif // LIBC_GLIBC && !USE_TCMALLOC
+
+#endif // !*_SANITIZER
void EnableTerminationOnHeapCorruption() {
// On Linux, there nothing to do AFAIK.
« no previous file with comments | « no previous file | build/build_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698