Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

faq184-3504 - Memory Management

Status
Not open for further replies.

Neil Toulouse

Programmer
Mar 18, 2002
882
GB
faq184-3504

I don't know if anyone uses this function, or if this issue has been reported, but my app fell over today because of it! Caused by too much RAM ;-)

Anyway easy fix, change:

Code:
DECLARE GlobalMemoryStatus IN Win32API STRING @lpMemoryStatus
lpMemoryStatus = REPLICATE(CHR(0), 32)
GlobalMemoryStatus(@lpMemoryStatus)

...to

Code:
DECLARE GlobalMemoryStatusEx IN Win32API STRING @lpMemoryStatus
lpMemoryStatus = REPLICATE(CHR(0), 32)
GlobalMemoryStatusEx(@lpMemoryStatus)

MSDN reference:




I like work. It fascinates me. I can sit and look at it for hours...
 
Neil,

We use GlobalMemoryStatus() in an exercise on my advanced course. I've never known any problem with it, but, then again, I've not used it in a production environment.

Presumably, it's the SYS(3050) that's causing the problem, not the GlobalMemoryStatus().

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike!

Not sure where the problem lay (didn't look into it too much!!), but changing GlobalMemoryStatus to GlobalMemoryStatusEx did the trick!

Neil

I like work. It fascinates me. I can sit and look at it for hours...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top