mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [mesos] bmahler commented on pull request #365: Fix FreeBSD memory detection (MESOS-10104)
Date Wed, 20 May 2020 23:18:00 GMT

bmahler commented on pull request #365:

   @Digital-Chaos Thanks! Looked through the sysctl related documentation and the code makes
sense to me. I will ship this as is.
   However, I wonder why the code bothers with the lookup by name -> mib transformation
and doesn't just do by name (slower) or by mib (faster) entirely:
   sysctlbyname("vm.swap_info.0", ...)
   sysctlbyname("vm.swap_info.1", ...)
   // until ENOENT
   // Or:
   int mib[3] = { CTL_VM, XXX, 0 }; // Oh.. I can't find something that looks like swap_info,
                                    // is there not a mib constant we can use for every name
we can lookup?
   (This applies to the earlier sysctlbyname calls in this function as well). Is it because
not all entries have mib constants that we can just fill in without lookup?

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message