void-packages/srcpkgs/chromium/patches/no-mallinfo.patch
2016-11-28 16:51:19 +01:00

22 lines
1.1 KiB
Diff

--- base/trace_event/malloc_dump_provider.cc.orig 2016-11-16 02:19:56.753320143 +0100
+++ base/trace_event/malloc_dump_provider.cc 2016-11-16 02:13:58.286196506 +0100
@@ -224,7 +224,7 @@
resident_size = all_heap_info.committed_size;
allocated_objects_size = all_heap_info.allocated_size;
allocated_objects_count = all_heap_info.block_count;
-#else
+#elif defined(OS_LINUX) && defined(__GLIBC__)
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
--- content/child/content_child_helpers.cc.orig 2016-05-08 08:05:37.415219394 +0200
+++ 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 =