Use vm_region_64 on 64-bit arch; cache memory for longer
This is a port of the Apple patches at
1. Use vm_region_64 instead of vm_region on __ppc64__ or __x86_64__
2. Use 300 second timeout for the cache.
This comment about the code being incredibly expensive is
very true: on a 1.7 GHz i7 with 8 GB of RAM (admittedly a
small machine) it took 17 seconds to calculate and
return HOST-RESOURCES-MIB::hrMemorySize.0. Most SNMP
clients would give up long before getting this answer.
2 files changed