Bruno Haible <[email protected]> writes:

> 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.

Right, I used it because I could not find any macros for them.

>From the man page [1], the 'int mib[]' from sysctlnametomib can be
cached for performance. However, I didn't really see the need in this
case. I guess if some has a program that repeatedly calls
physmem_claimable we can adjust it.

Collin

[1] https://man.freebsd.org/cgi/man.cgi?query=sysctlnametomib

Reply via email to