diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-11 04:28:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-11 04:28:51 +0000 |
commit | 5a62fdee4d166fe0eff14bc616e1befa8ad54cd2 (patch) | |
tree | 5c8223dec1277bcb3027f9c3e84c0f7d0e8b2bdc /vm_dump.c | |
parent | 84b5bb9802d8079d92c8e4c432f0b37e9589bc99 (diff) | |
download | ruby-5a62fdee4d166fe0eff14bc616e1befa8ad54cd2.tar.gz |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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++) { |