0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00
mongodb/util/processinfo.h
2009-02-20 15:23:14 -05:00

38 lines
522 B
C++

// processinfo.h
#pragma once
#include <sys/types.h>
#ifndef _WIN32
#include <unistd.h>
#else
typedef int pid_t;
int getpid();
#endif
namespace mongo {
class ProcessInfo {
public:
ProcessInfo( pid_t pid = getpid() );
~ProcessInfo();
/**
* @return mbytes
*/
int getVirtualMemorySize();
/**
* @return mbytes
*/
int getResidentSize();
bool supported();
private:
pid_t _pid;
};
}