aboutsummaryrefslogtreecommitdiff
path: root/extra/firefox/patches/mallinfo.patch
blob: 0649413c1918e7651933a54dfc97080d22401c7a (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
30
31
32
33
34
--- a/xpcom/base/nsMemoryReporterManager.cpp.orig	2019-03-19 17:12:20.844810044 +0100
+++ b/xpcom/base/nsMemoryReporterManager.cpp	2019-03-19 17:13:32.505133615 +0100
@@ -123,6 +123,7 @@
   return GetProcSelfSmapsPrivate(aN);
 }

+#ifdef __GLIBC__
 #  ifdef HAVE_MALLINFO
 #    define HAVE_SYSTEM_HEAP_REPORTER 1
 static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
@@ -142,6 +143,7 @@
   return NS_OK;
 }
 #  endif
+#endif // __GLIBC__

 #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
     defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
@@ -642,6 +644,7 @@
   return NS_OK;
 }

+#ifdef __GLIBC__
 #  define HAVE_SYSTEM_HEAP_REPORTER 1
 // Windows can have multiple separate heaps. During testing there were multiple
 // heaps present but the non-default ones had sizes no more than a few 10s of
@@ -698,6 +701,7 @@
   *aSizeOut = heapsSize;
   return NS_OK;
 }
+#endif // __GLIBC__

 struct SegmentKind {
   DWORD mState;