Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!sunybcs!rutgers!mailrus!csd4.milw.wisc.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!mms00786 From: mms00786@uxa.cso.uiuc.edu Newsgroups: comp.windows.ms Subject: GlobalCompact and Free Memory? Message-ID: <246400012@uxa.cso.uiuc.edu> Date: 22 Jul 89 17:59:00 GMT Lines: 23 Nf-ID: #N:uxa.cso.uiuc.edu:246400012:000:683 Nf-From: uxa.cso.uiuc.edu!mms00786 Jun 17 12:59:00 1989 Hello. I just got started on Windows programming, and bought a copy of Petzold's book. As is my luck, I picked Freemem as the first program to try, and of course it doesn't work. I have 4 Megabytes of memory, and the MSDos Exec confirms this in the about dialog box. However, when I run FreeMem, it always tells me I have 280 K of free memory. This is what GlobalCompact (0L) returns, even after I GlobalAlloc 280k! In other words, the function that I seem to be calling seems t to be: DWORD FAR PASCAL GlobalCompact (... { return 280L; } I am using Windows/386 on a Gateway 2000 machine. Can someone please tell me what is going on here? Thanks a bunch in advance, Milan. .