33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
In musl libc there is no struct mallinfo and no function mallinf()
|
|
|
|
--- qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2015-06-05 04:52:18.502230985 +0200
|
|
+++ qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2015-06-05 04:52:06.712231020 +0200
|
|
@@ -15,7 +15,7 @@
|
|
|
|
namespace content {
|
|
|
|
-#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 =
|
|
--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2016-03-03 15:48:36.000000000 +0100
|
|
+++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2016-03-17 05:09:41.409425897 +0100
|
|
@@ -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,7 +47,7 @@
|
|
MemoryAllocatorDump* inner_dump = pmd->CreateAllocatorDump(kAllocatedObjects);
|
|
inner_dump->AddScalar(MemoryAllocatorDump::kNameSize,
|
|
MemoryAllocatorDump::kUnitsBytes, info.uordblks);
|
|
-
|
|
+#endif
|
|
return true;
|
|
}
|
|
|