22#if defined( __linux__ ) or defined( __APPLE__ )
25# include <sys/types.h>
70 explicit operator bool()
const {
return m_fd != -1; }
71 template <
typename... Args>
73 m_fd =
::open( std::forward<Args>( args )... );
86#define unique_fd_forward( fun ) \
87 template <typename... Args> \
88 auto fun( Args&&... args ) const { \
89 return ::fun( m_fd, std::forward<Args>( args )... ); \
100#undef unique_fd_forward
#define unique_fd_forward(fun)
unique_fd(const unique_fd &)=delete
unique_fd(unique_fd &&other)
unique_fd(const int fd=-1)
unique_fd & open(Args &&... args)
unique_fd & operator=(const unique_fd &)=delete
bool fetch(procInfo &fill_me)
static ProcStats * instance()
auto pageSize() const noexcept
procInfo(double sz, double rss_sz)