On Jan 31, 8:40 am, kevin.he...@gmail.com wrote:
Hi all,
How to implement such function for Linux/Unix?
First off, as the C standard makes no mention of language facilities
to determine "if memory is low" and does not specify operating system
specific interfaces, your question is off-topic for comp.lang.c. You
might want to ask in the comp.os.linux.development.apps newsgroup, or
one of the other linux newsgroups. We can't help you here.
Secondly, what makes you think that there /is/ a way to determine "if
memory is low", or that such a measurement is meaningful or even
necessary? My (experienced) guess is that you are trying to solve the
wrong problem. When you ask in the Linux newsgroup, don't ask about
specific functions. Instead, describe the problem you think you have
(the one that, to you, necessitates that you measure whether or not
"memory is low") and ask for help and advice on /that/ problem.
Chances are that you'll get better advice than you would with "what
function should I call" type questions.
[snip]
HTH
--
Lew