I need to monitor:
- physical memory
- swap memory
- virtual memory
for the current process. Total and available (free).
Physical and swap I acquire with no problems whatsoever using sysinfo
stucture, I can get used virtual memory from e.x. /proc/self/statm
...
...but I still need total and/or free virtual memory for the current process. How to accomplish this?
This is purely Linux related question (in Win it's easy). Used distros: Ubuntu, Fedora.
EDIT: Maybe it will be easier to understand my question, when I say that I'm trying to acquire equivalent of
ullTotalVirtual
andullAvailVirtual
from Windows MEMORYSTATUSEX structure from GlobalMemoryStatus() on Linux systems.