void-packages/srcpkgs/chromium/patches/no-mallinfo.patch
2015-12-05 09:29:19 +01:00

29 lines
972 B
Diff

--- ./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
+++ ./base/trace_event/malloc_dump_provider.cc
@@ -30,6 +30,7 @@
// the current process.
bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
ProcessMemoryDump* pmd) {
+#if defined(__GLIBC__)
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
@@ -47,6 +48,7 @@
MemoryAllocatorDump* inner_dump = pmd->CreateAllocatorDump(kAllocatedObjects);
inner_dump->AddScalar(MemoryAllocatorDump::kNameSize,
MemoryAllocatorDump::kUnitsBytes, info.uordblks);
+#endif
return true;
}