Go to the documentation of this file.
22 #if defined( __linux__ ) or defined( __APPLE__ )
24 # include <sys/stat.h>
25 # include <sys/types.h>
27 #endif // __linux__ or __APPLE__
36 # pragma warning( push )
37 # pragma warning( disable : 1572 )
44 # pragma warning( pop )
85 explicit operator bool()
const {
return m_fd != -1; }
86 template <
typename... Args>
101 #define unique_fd_forward( fun ) \
102 template <typename... Args> \
103 auto fun( Args&&... args ) const { \
104 return ::fun( m_fd, std::forward<Args>( args )... ); \
115 #undef unique_fd_forward
static ProcStats * instance()
unique_fd(unique_fd &&other)
procInfo(double sz, double rss_sz)
unique_fd(const int fd=-1)
unique_fd & open(Args &&... args)
def read(f, regex=".*", skipevents=0)
bool fetch(procInfo &fill_me)
#define unique_fd_forward(fun)
unique_fd & operator=(const unique_fd &)=delete
auto pageSize() const noexcept
unique_fd(const unique_fd &)=delete
bool operator==(const procInfo &p) const