blob: 6e1063084af3f56133f1474c02cbf57e193cce9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
}
|