Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
834fa587
Unverified
Commit
834fa587
authored
Jan 19, 2022
by
David CARLIER
Committed by
GitHub
Jan 19, 2022
Browse files
zmalloc_get_rss openbsd implementation (#10149)
Add support for getting the RSS in OpenBSD
parent
3720de78
Changes
1
Show whitespace changes
Inline
Side-by-side
src/zmalloc.c
View file @
834fa587
...
...
@@ -467,10 +467,16 @@ size_t zmalloc_get_rss(void) {
return
0L
;
}
#elif defined(__NetBSD__)
#elif defined(__NetBSD__)
|| defined(__OpenBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
#if defined(__OpenBSD__)
#define kinfo_proc2 kinfo_proc
#define KERN_PROC2 KERN_PROC
#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
#endif
size_t
zmalloc_get_rss
(
void
)
{
struct
kinfo_proc2
info
;
size_t
infolen
=
sizeof
(
info
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment