mallinfo.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. diff --git a/platform/xpcom/base/nsMemoryReporterManager.cpp b/platform/xpcom/base/nsMemoryReporterManager.cpp
  2. index 810254b..cdbc3b3 100644
  3. --- a/platform/xpcom/base/nsMemoryReporterManager.cpp
  4. +++ b/platform/xpcom/base/nsMemoryReporterManager.cpp
  5. @@ -151,6 +151,7 @@ ResidentUniqueDistinguishedAmount(int64_t* aN)
  6. return GetProcSelfSmapsPrivate(aN);
  7. }
  8. +#ifdef __GLIBC__
  9. #ifdef HAVE_MALLINFO
  10. #define HAVE_SYSTEM_HEAP_REPORTER 1
  11. static MOZ_MUST_USE nsresult
  12. @@ -172,6 +173,7 @@ SystemHeapSize(int64_t* aSizeOut)
  13. return NS_OK;
  14. }
  15. #endif
  16. +#endif // __GLIBC__
  17. #elif defined(__DragonFly__) || defined(__FreeBSD__) \
  18. || defined(__NetBSD__) || defined(__OpenBSD__) \
  19. @@ -530,6 +532,7 @@ PrivateDistinguishedAmount(int64_t* aN)
  20. return NS_OK;
  21. }
  22. +#ifdef __GLIBC__
  23. #define HAVE_SYSTEM_HEAP_REPORTER 1
  24. // Windows can have multiple separate heaps. During testing there were multiple
  25. // heaps present but the non-default ones had sizes no more than a few 10s of
  26. @@ -580,6 +583,7 @@ SystemHeapSize(int64_t* aSizeOut)
  27. *aSizeOut = heapsSize;
  28. return NS_OK;
  29. }
  30. +#endif // __GLIBC__
  31. struct SegmentKind
  32. {