pxar
 All Classes Namespaces Functions Variables Typedefs Friends
rsstools.hh
1 #ifndef PXAR_RSSTOOLS_H
2 #define PXAR_RSSTOOLS_H
3 
4 #include "pxardllexport.h"
5 
6 /*
7  * Author: David Robert Nadeau
8  * Site: http://NadeauSoftware.com/
9  * License: Creative Commons Attribution 3.0 Unported License
10  * http://creativecommons.org/licenses/by/3.0/deed.en_US
11  */
12 
13 #if defined(WIN32)
14 #include <windows.h>
15 #include <Psapi.h>
16 
17 #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
18 #include <unistd.h>
19 #include <sys/resource.h>
20 
21 #if defined(__APPLE__) && defined(__MACH__)
22 #include <mach/mach.h>
23 
24 #elif (defined(_AIX) || defined(__TOS__AIX__)) || (defined(__sun__) || defined(__sun) || defined(sun) && (defined(__SVR4) || defined(__svr4__)))
25 #include <fcntl.h>
26 #include <procfs.h>
27 
28 #elif defined(__linux__) || defined(__linux) || defined(linux) || defined(__gnu_linux__)
29 #include <stdio.h>
30 
31 #endif
32 
33 #else
34 #error "Cannot define getPeakRSS( ) or getCurrentRSS( ) for an unknown OS."
35 #endif
36 
37 
38 class DLLEXPORT rsstools{
39 public:
40  rsstools();
41  ~rsstools();
42 
48  size_t getPeakRSS();
49 
54  size_t getCurrentRSS();
55 private:
56 
57 };
58 
59 #endif
60