summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 04:28:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 04:28:51 +0000
commit5a62fdee4d166fe0eff14bc616e1befa8ad54cd2 (patch)
tree5c8223dec1277bcb3027f9c3e84c0f7d0e8b2bdc /vm_dump.c
parent84b5bb9802d8079d92c8e4c432f0b37e9589bc99 (diff)
vm_dump.c: check procstat_getvmmap
* configure.in: check also procstat_getvmmap, which is not available on FreeBSD 9. [ruby-core:68468] [Bug #10954] * vm_dump.c (procstat_vm): use kinfo_getvmmap instead if procstat_getvmmap is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 45e4cb238e..1825f6845c 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -735,7 +735,11 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp)
ptrwidth, "START", ptrwidth, "END", "PRT", "RES",
"PRES", "REF", "SHD", "FL", "TP", "PATH");
+#ifdef HAVE_PROCSTAT_GETVMMAP
freep = procstat_getvmmap(procstat, kipp, &cnt);
+#else
+ freep = kinfo_getvmmap(kipp->ki_pid, &cnt);
+#endif
if (freep == NULL)
return;
for (i = 0; i < cnt; i++) {