aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/no-mallinfo.patch
blob: 965cddb2eb231dd4123c275485d40769a719568b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/base/trace_event/malloc_dump_provider.cc.orig	2016-05-08 08:04:01.166374018 +0200
+++ b/base/trace_event/malloc_dump_provider.cc	2016-05-08 08:05:07.846264723 +0200
@@ -61,7 +61,7 @@ bool MallocDumpProvider::OnMemoryDump(co
   // fixed quantum, so the excess region will not be resident.
   // See crrev.com/1531463004 for detailed explanation.
   resident_size = stats.max_size_in_use;
-#else
+#elif defined(OS_LINUX) && defined(__GLIBC__)
   struct mallinfo info = mallinfo();
   DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
 
--- a/content/child/content_child_helpers.cc.orig	2016-05-08 08:05:37.415219394 +0200
+++ b/content/child/content_child_helpers.cc	2016-05-08 08:06:27.110142484 +0200
@@ -24,7 +24,7 @@ namespace content {
 // though, this provides only a partial and misleading value.
 // Unfortunately some telemetry benchmark rely on it and these need to
 // be refactored before getting rid of this. See crbug.com/581365 .
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) && defined(__GLIBC__) || defined(OS_ANDROID)
 size_t GetMemoryUsageKB() {
   struct mallinfo minfo = mallinfo();
   uint64_t mem_usage =