Q. How can I determine how much memory my application can allocate without severely impacting other applications?
A. you could use GlobalMemoryStatus for this.
usage:
MEMORYSTATUS gMemStatus;
GlobalMemoryStatus(&gMemStatus);
if (gMemStatus.dwMemoryLoad < somevalue)
{
//do.... LocalAlloc
} else
{
//do not allocate anything u want.,........like free memory close other apps and try again...
}
Tuesday, 8 January 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment