diff options
Diffstat (limited to 'community/chromium/no-mallinfo.patch')
-rw-r--r-- | community/chromium/no-mallinfo.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/community/chromium/no-mallinfo.patch b/community/chromium/no-mallinfo.patch new file mode 100644 index 0000000000..6e1063084a --- /dev/null +++ b/community/chromium/no-mallinfo.patch @@ -0,0 +1,29 @@ +--- ./content/child/content_child_helpers.cc.orig ++++ ./content/child/content_child_helpers.cc +@@ -15,7 +15,7 @@ + + namespace content { + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(__GLIBC__) || defined(OS_ANDROID) + size_t GetMemoryUsageKB() { + struct mallinfo minfo = mallinfo(); + uint64_t mem_usage = +--- ./base/trace_event/malloc_dump_provider.cc.orig ++++ ./base/trace_event/malloc_dump_provider.cc +@@ -29,6 +29,7 @@ + // Called at trace dump point time. Creates a snapshot the memory counters for + // the current process. + bool MallocDumpProvider::OnMemoryDump(ProcessMemoryDump* pmd) { ++#if defined(__GLIBC__) + struct mallinfo info = mallinfo(); + DCHECK_GE(info.arena + info.hblkhd, info.uordblks); + +@@ -46,6 +47,7 @@ + MemoryAllocatorDump* inner_dump = pmd->CreateAllocatorDump(kAllocatedObjects); + inner_dump->AddScalar(MemoryAllocatorDump::kNameSize, + MemoryAllocatorDump::kUnitsBytes, info.uordblks); ++#endif + + return true; + } |