Featured post
Find remaining memory available to a process in 32 bit Linux using C++ -
my c++ program caches lots of objects, , in beginning of each major api call, want ensure there @ least 500 mb available api call. may either running out of ram+swap space (consider system 1 gb ram + 1 gb swap file), or may running out of virtual address in process.(i may using 3.7 gb out of total 4gb address space). it's not easy me approximate how data have cached, can purge of if becoming issue, , iteratively till have 500 mb available in system or address space (whichever becoming bottleneck). requirements find in c++ on 32 bit linux:
a) find how ram + swap space free.
b) how user space address space available process.
c) how virtual memory process using. consider similar 'commit size' or 'working set size' of process on windows.
any answers appreciated.
take @ source vmstat : here. search domem() function, gather information memory (occupied , free).
- Get link
- X
- Other Apps
Comments
Post a Comment