free system memory

How do I find out from my program how much available system memory I have? I hate to use popen(“pidin info”,“r”) and then parse the result.

Take a look at the source code of SPIN and see how it is done.

Thank you for the cue but the link to the source code is not valid. Could you e-mail it to me if you have it at ibbhl@yahoo.com? Thank you in advance. Eugene

see attached.