#ifndef __JSYSTEM__JSYSINFO__ #define __JSYSTEM__JSYSINFO__ #include /** * \file * System information. * \author mdejong */ namespace JSYSTEM {} namespace JPP { using namespace JSYSTEM; } namespace JSYSTEM { /** * Auxiliary class for system information. * This class encapsulates the sysinfo data structure. */ struct JSysinfo : public sysinfo { /** * Default constructor. */ JSysinfo() { ::sysinfo(static_cast(this)); } /** * Get total RAM. * * \return total RAM [B] */ unsigned long long int getTotalRAM() const { return (unsigned long long int) this->totalram * (unsigned long long int) this->mem_unit; } }; } #endif