aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/no-mallinfo.patch
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-03-10 23:54:38 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2016-03-10 23:54:45 +0100
commitf69e941936d866a7ddc3ed316fdcd0916eb2908f (patch)
treefa6eef918e6895e433a3b8496b566668da900c60 /community/chromium/no-mallinfo.patch
parentf53dc6e19270cdc7d95e606eb8fb588f09edafee (diff)
downloadaports-f69e941936d866a7ddc3ed316fdcd0916eb2908f.tar.bz2
aports-f69e941936d866a7ddc3ed316fdcd0916eb2908f.tar.xz
community/chromium: upgrade to 49.0.2623.87
Diffstat (limited to 'community/chromium/no-mallinfo.patch')
-rw-r--r--community/chromium/no-mallinfo.patch57
1 files changed, 27 insertions, 30 deletions
diff --git a/community/chromium/no-mallinfo.patch b/community/chromium/no-mallinfo.patch
index 7ce835b096..be571d40ad 100644
--- a/community/chromium/no-mallinfo.patch
+++ b/community/chromium/no-mallinfo.patch
@@ -1,41 +1,38 @@
---- ./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
-@@ -55,6 +55,7 @@
- res = get_property_function("generic.current_allocated_bytes",
- &allocated_objects_size);
- DCHECK(res);
-+#if defined(__GLIBC__)
- } else {
- struct mallinfo info = mallinfo();
- DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
-@@ -65,9 +66,11 @@
- total_virtual_size = info.arena + info.hblkhd;
- resident_size = info.uordblks;
- allocated_objects_size = info.uordblks;
-+#endif
- }
+@@ -61,7 +61,7 @@
+ // fixed quantum, so the excess region will not be resident.
+ // See crrev.com/1531463004 for detailed explanation.
+ resident_size = stats.max_size_in_use;
+-#else
++#elif defined(__GLIBC__)
+ struct mallinfo info = mallinfo();
+ DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
+
+@@ -73,6 +73,7 @@
+ allocated_objects_size = info.uordblks;
#endif
-+#if defined(__GLIBC__)
++#if defined(USE_TCMALLOC) || defined(__GLIBC__) || defined(OS_MACOSX) || defined(OS_IOS)
MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
outer_dump->AddScalar("virtual_size", MemoryAllocatorDump::kUnitsBytes,
total_virtual_size);
-@@ -79,6 +82,7 @@
- inner_dump->AddScalar(MemoryAllocatorDump::kNameSize,
- MemoryAllocatorDump::kUnitsBytes,
- allocated_objects_size);
+@@ -95,6 +96,7 @@
+ MemoryAllocatorDump::kUnitsBytes,
+ resident_size - allocated_objects_size);
+ }
+#endif
return true;
}
+--- ./content/child/content_child_helpers.cc
++++ ./content/child/content_child_helpers.cc
+@@ -18,7 +18,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 =