Reputation: 687
Does anyone know how to print out memory addresses of UNIX application's memory using C?
I need to print out those information of addresses when I run my code, for instance 'the number of pages of physical memory'
The output i'm looking for this example is something like...
Number of pages:
384285
Thank you
Upvotes: 0
Views: 538
Reputation: 43278
char buf[40];
sprintf(buf, "exec cat /proc/%d/status", getpid());
system(buf);
Upvotes: 1