private function _buildMemory()
    {
        $memory = $this->_xml->addChild('Memory');
        $memory->addAttribute('Free', $this->_sys->getMemFree());
        $memory->addAttribute('Used', $this->_sys->getMemUsed());
        $memory->addAttribute('Total', $this->_sys->getMemTotal());
        $memory->addAttribute('Percent', $this->_sys->getMemPercentUsed());
        if (($this->_sys->getMemApplication() !== null) || ($this->_sys->getMemBuffer() !== null) || ($this->_sys->getMemCache() !== null)) {
            $details = $memory->addChild('Details');
            if ($this->_sys->getMemApplication() !== null) {
                $details->addAttribute('App', $this->_sys->getMemApplication());
                $details->addAttribute('AppPercent', $this->_sys->getMemPercentApplication());
            }
            if ($this->_sys->getMemBuffer() !== null) {
                $details->addAttribute('Buffers', $this->_sys->getMemBuffer());
                $details->addAttribute('BuffersPercent', $this->_sys->getMemPercentBuffer());
            }
            if ($this->_sys->getMemCache() !== null) {
                $details->addAttribute('Cached', $this->_sys->getMemCache());
                $details->addAttribute('CachedPercent', $this->_sys->getMemPercentCache());
            }
        }
        if (count($this->_sys->getSwapDevices()) > 0) {
            $swap = $memory->addChild('Swap');
            $swap->addAttribute('Free', $this->_sys->getSwapFree());
            $swap->addAttribute('Used', $this->_sys->getSwapUsed());
            $swap->addAttribute('Total', $this->_sys->getSwapTotal());
            $swap->addAttribute('Percent', $this->_sys->getSwapPercentUsed());
            $i = 1;
            foreach ($this->_sys->getSwapDevices() as $dev) {
                $swapMount = $swap->addChild('Mount');
                $this->_fillDevice($swapMount, $dev, $i++);
            }
        }
    }