MongoDB  2.1.1-pre-
systeminfo.h
00001 
00017 #pragma once
00018 
00019 #include <cstddef>
00020 
00021 namespace mongo {
00022 
00023     class SystemInfo {
00024     public:
00025         /*
00026           Get the amount of physical memory available on the host.
00027 
00028           This should only be used for "advisory" purposes, and not as a hard
00029           value, because this could be deceptive on virtual hosts, and because
00030           this will return zero on platforms that do not support it.
00031 
00032           @returns amount of physical memory, or zero
00033          */
00034         static size_t getPhysicalRam();
00035 
00036     private:
00037         // don't instantiate this class
00038         SystemInfo(); // no implementation
00039     };
00040 
00041 }