Unverified Commit d428de59 authored by David CARLIER's avatar David CARLIER Committed by GitHub
Browse files

DragonFlyBSD resident memory amount (almost) similar as FreeBSD. (#8023)

parent cd1c6005
......@@ -365,7 +365,7 @@ size_t zmalloc_get_rss(void) {
return t_info.resident_size;
}
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/user.h>
......@@ -381,7 +381,11 @@ size_t zmalloc_get_rss(void) {
mib[3] = getpid();
if (sysctl(mib, 4, &info, &infolen, NULL, 0) == 0)
#if defined(__FreeBSD__)
return (size_t)info.ki_rssize;
#else
return (size_t)info.kp_vm_rssize;
#endif
return 0L;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment