Re: check if the memory is low, from Windows to Unix
- From: "robertwessel2@xxxxxxxxx" <robertwessel2@xxxxxxxxx>
- Date: 31 Jan 2007 07:58:43 -0800
On Jan 31, 7:40 am, kevin.he...@xxxxxxxxx wrote:
Hi all,
How to implement such function for Linux/Unix?
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
result = ((float)stat.dwAvailPageFile / stat.dwTotalPageFile) < 0.1;
As others have pointed out, this is OT for the group, but the above
does not do what you appear to want, even under Windows. The page
file size is dynamic (unless it's been explicitly fixed), so the ratio
you're computing is basically meaningless.
.
- References:
- check if the memory is low, from Windows to Unix
- From: kevin . heart
- check if the memory is low, from Windows to Unix
- Prev by Date: Re: Initialising Variables
- Next by Date: Re: Does Casting Slow a Program Down?
- Previous by thread: Re: check if the memory is low, from Windows to Unix
- Next by thread: Does Casting Slow a Program Down?
- Index(es):