mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 969800 - Fix nsMemoryReporterManager::GetVsize for !HAVE_VSIZE_AND_RESIDENT_REPORTERS and add GNU/kFreeBSD support to nsMemoryReporterManager. r=njn
This commit is contained in:
parent
082475052b
commit
9ff8bb64aa
@ -120,11 +120,12 @@ public:
|
||||
NS_IMPL_ISUPPORTS1(ResidentUniqueReporter, nsIMemoryReporter)
|
||||
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__) \
|
||||
|| defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|| defined(__NetBSD__) || defined(__OpenBSD__) \
|
||||
|| defined(__FreeBSD_kernel__)
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <sys/user.h>
|
||||
#endif
|
||||
|
||||
@ -141,7 +142,7 @@ NS_IMPL_ISUPPORTS1(ResidentUniqueReporter, nsIMemoryReporter)
|
||||
#if defined(__DragonFly__)
|
||||
#define KP_SIZE(kp) (kp.kp_vm_map_size)
|
||||
#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize())
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#define KP_SIZE(kp) (kp.ki_size)
|
||||
#define KP_RSS(kp) (kp.ki_rssize * getpagesize())
|
||||
#elif defined(__NetBSD__)
|
||||
@ -1381,7 +1382,7 @@ nsMemoryReporterManager::GetVsize(int64_t* aVsize)
|
||||
#ifdef HAVE_VSIZE_AND_RESIDENT_REPORTERS
|
||||
return VsizeDistinguishedAmount(aVsize);
|
||||
#else
|
||||
*aResident = 0;
|
||||
*aVsize = 0;
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user