CrazyC
CrazyC

Reputation: 1896

System API to get process used memory status

I have a requirement where my running application(On LINUX) will check his used memory status. On the basis of the used status it will do some clean up job. Anyone know any system API to call from C application to know the used memory status on .

Upvotes: 0

Views: 352

Answers (1)

cnicutar
cnicutar

Reputation: 182619

Both free(1) and vmstat(8) actually open and parse /proc/meminfo so you could try that.

Upvotes: 1

Related Questions