1%%%%%%%%%%%%%%%%%%% 2% XLiFE++ is an extended library of finite elements written in C++ 3% Copyright (C) 2014 Lunéville, Eric; Kielbasiewicz, Nicolas; Lafranche, Yvon; Nguyen, Manh-Ha; Chambeyron, Colin 4% 5% This program is free software: you can redistribute it and/or modify 6% it under the terms of the GNU General Public License as published by 7% the Free Software Foundation, either version 3 of the License, or 8% (at your option) any later version. 9% This program is distributed in the hope that it will be useful, 10% but WITHOUT ANY WARRANTY; without even the implied warranty of 11% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12% GNU General Public License for more details. 13% You should have received a copy of the GNU General Public License 14% along with this program. If not, see <http://www.gnu.org/licenses/>. 15%%%%%%%%%%%%%%%%%%% 16 17\section{The {\classtitle Memory} class} 18 19The {\class Memory} class is a small utility class giving some informations about the memory usage in different format. 20\vspace{.2cm} 21\begin{lstlisting} 22enum MemoryUnit {_byte,_kilobyte,_megabyte,_gigabyte,_terabyte}; 23class Memory 24{ 25public: 26static real_t physicalMem(MemoryUnit mu=_megabyte); 27static real_t physicalFreeMem(MemoryUnit mu=_megabyte); 28static real_t virtualMem(MemoryUnit mu=_megabyte); 29static real_t virtualFreeMem(MemoryUnit mu=_megabyte); 30static real_t processPhysicalMem(MemoryUnit mu=_megabyte); 31static real_t processVirtualMem(MemoryUnit mu=_megabyte); 32}; 33 34real_t byteTo(number_t mem, MemoryUnit mu=_megabyte); 35\end{lstlisting} 36\vspace{.1cm} 37All the member functions are static. Default unit is the MegaByte. Note that virtual memory is not available for unix/linux systems! 38 39\displayInfos{library=utils, header=Memory.hpp, implementation=Memory.cpp, header dep={config.h}}