2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-08-22 22:16:19 +00:00
repo/testing/chromium/patches/musl-mallinfo-r7.patch
2019-07-28 18:49:11 +03:00

48 lines
2.1 KiB
Diff

diff --git chromium-75.0.3770.100/base/process/process_metrics_posix.cc chromium-75.0.3770.100/base/process/process_metrics_posix.cc
index a09bbf2..f0a439f 100644
--- chromium-75.0.3770.100/base/process/process_metrics_posix.cc
+++ chromium-75.0.3770.100/base/process/process_metrics_posix.cc
@@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() {
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID)
struct mallinfo minfo = mallinfo();
#if defined(USE_TCMALLOC)
return minfo.uordblks;
#else
return minfo.hblkhd + minfo.arena;
#endif
-#elif defined(OS_FUCHSIA)
+#else
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
return 0;
#endif
diff --git chromium-75.0.3770.100/base/trace_event/malloc_dump_provider.cc chromium-75.0.3770.100/base/trace_event/malloc_dump_provider.cc
index 0077d8b..13ef0f3 100644
--- chromium-75.0.3770.100/base/trace_event/malloc_dump_provider.cc
+++ chromium-75.0.3770.100/base/trace_event/malloc_dump_provider.cc
@@ -132,7 +132,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
}
#elif defined(OS_FUCHSIA)
// TODO(fuchsia): Port, see https://crbug.com/706592.
-#else
+#elif defined(OS_LINUX) && defined(__GLIBC__)
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
diff --git chromium-69.0.3497.100/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
index e14edbd..154fefe 100644
--- chromium-69.0.3497.100/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
+++ chromium-69.0.3497.100/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
@@ -130,7 +130,7 @@
/* #undef HAVE_MALLCTL */
/* Define to 1 if you have the `mallinfo' function. */
-#define HAVE_MALLINFO 1
+/* #undef HAVE_MALLINFO */
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1