Can anyone advise of AIX system calls that can be used to programatically check memory usage? I’m working with a large multithreaded C++ app which is currently running out of memory (using 32 bit, large memory model on AIX 6.1) due to a large unlimited series of in-memory caches. I can certainly limit the caches’ growth, but it is difficult due to their complex structure to work out how large they’ve got; much better IMO just to assess how much memory the process is taking up and limit based on that.
Using the very large memory model is not a possibility due to the use of shared memory, and going 64 bit is also not feasible in the short term.
For AIX I found that the following work fine in my applications:
I believe that using vminfo (/usr/include/sys/vminfo.h) you should be able to get the used memory system-wide.