aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/no-mallinfo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/chromium/no-mallinfo.patch')
-rw-r--r--community/chromium/no-mallinfo.patch29
1 files changed, 27 insertions, 2 deletions
diff --git a/community/chromium/no-mallinfo.patch b/community/chromium/no-mallinfo.patch
index 613169decc0..37abb3fe062 100644
--- a/community/chromium/no-mallinfo.patch
+++ b/community/chromium/no-mallinfo.patch
@@ -1,3 +1,6 @@
+musl does not implement mallinfo()/mallinfo2()
+(or rather, malloc-ng, musl's allocator, doesn't)
+--
--- a/base/trace_event/malloc_dump_provider.cc
+++ b/base/trace_event/malloc_dump_provider.cc
@@ -185,7 +185,6 @@
@@ -25,8 +28,8 @@
ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
&allocated_objects_size, &allocated_objects_count);
#endif
---- ./base/process/process_metrics_posix.cc.orig
-+++ ./base/process/process_metrics_posix.cc
+--- a/base/process/process_metrics_posix.cc
++++ b/base/process/process_metrics_posix.cc
@@ -105,7 +105,7 @@
#endif // !BUILDFLAG(IS_FUCHSIA)
@@ -97,3 +100,25 @@
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
+--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
+@@ -717,7 +717,7 @@
+
+ #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if 0
+ SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
+ base::SimplePartitionStatsDumper allocator_dumper;
+ Allocator()->DumpStats("malloc", true, &allocator_dumper);
+--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
+@@ -24,7 +24,7 @@
+ #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+
+ // Platforms on which we override weak libc symbols.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
+
+ NOINLINE void FreeForTest(void* data) {
+ free(data);