patch-xpcom_base_nsMemoryReporterManager_cpp 781 B

123456789101112131415161718
  1. --- firefox-49.0.1.orig/xpcom/base/nsMemoryReporterManager.cpp 2016-09-05 22:12:57.000000000 +0200
  2. +++ firefox-49.0.1/xpcom/base/nsMemoryReporterManager.cpp 2016-10-01 23:24:47.432038288 +0200
  3. @@ -157,6 +157,7 @@ ResidentUniqueDistinguishedAmount(int64_
  4. nsresult
  5. SystemHeapSize(int64_t* aSizeOut)
  6. {
  7. +#if defined(__GLIBC__) && !defined(__UCLIBC__)
  8. struct mallinfo info = mallinfo();
  9. // The documentation in the glibc man page makes it sound like |uordblks|
  10. @@ -170,6 +171,7 @@ SystemHeapSize(int64_t* aSizeOut)
  11. // shouldn't be a problem. Nonetheless, cast the |int|s to |size_t| before
  12. // adding them to provide a small amount of extra overflow protection.
  13. *aSizeOut = size_t(info.hblkhd) + size_t(info.uordblks);
  14. +#endif
  15. return NS_OK;
  16. }
  17. #endif