This patch implements a workaround for the issue with sysctl(KERN_PROC_VMMAP) calls on FreeBSD:
http://www.freebsd.org/cgi/query-pr.cgi?pr=188911
The patch should be reverted back as soon as the bug is fixed.
Since the patch relies on reading '/dev/kmem' which is not accessible for normal users by default, the following command granting reading access to all users shall be executed before running tests:
sudo chmod a+r /dev/kmem