mallinfo.patch 974 B

1234567891011121314151617181920212223242526272829303132333435
  1. --- a/xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:12:20.844810044 +0100
  2. +++ b/xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:13:32.505133615 +0100
  3. @@ -123,6 +123,7 @@
  4. return GetProcSelfSmapsPrivate(aN);
  5. }
  6. +#ifdef __GLIBC__
  7. # ifdef HAVE_MALLINFO
  8. # define HAVE_SYSTEM_HEAP_REPORTER 1
  9. static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
  10. @@ -142,6 +143,7 @@
  11. return NS_OK;
  12. }
  13. # endif
  14. +#endif // __GLIBC__
  15. #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
  16. defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
  17. @@ -642,6 +644,7 @@
  18. return NS_OK;
  19. }
  20. +#ifdef __GLIBC__
  21. # define HAVE_SYSTEM_HEAP_REPORTER 1
  22. // Windows can have multiple separate heaps. During testing there were multiple
  23. // heaps present but the non-default ones had sizes no more than a few 10s of
  24. @@ -698,6 +701,7 @@
  25. *aSizeOut = heapsSize;
  26. return NS_OK;
  27. }
  28. +#endif // __GLIBC__
  29. struct SegmentKind {
  30. DWORD mState;