Re: physmem on FreeBSD

Bruno Haible via Gnulib discussion list <[email protected]> Thu, 16 Jul 2026 10:12:36 +0200
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <4458676.U7HbjWM52l@cagnes>
Collin Funk wrote:
> All of those requests sound good to me. I pushed the attached v2 patch
> which addresses them.

Thanks!

According to the documentation, every sysctlbyname() call could alternatively
be done through a sysctl() call with an appropriate 'int mib[]' array.
But the values in this array:

  vm.stats.vm.v_free_count
  { CTL_VM, 0x7ffff7bb, 0x7ffff7b9, 0x7ffff790 }

  vm.stats.vm.v_inactive_count
  { CTL_VM, 0x7ffff7bb, 0x7ffff7b9, 0x7ffff78b }

(that I got by invoking sysctlnametomib()) are apparently not defined by the
include files. So, sysctlbyname actually gives access to more information
than sysctl does.

Bruno