Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!well!brent From: brent@well.UUCP (Brent Southard) Newsgroups: comp.windows.ms Subject: Re: GlobalCompact and Free Memory? Message-ID: <13004@well.UUCP> Date: 4 Aug 89 13:39:22 GMT References: <246400012@uxa.cso.uiuc.edu> Reply-To: brent@well.UUCP (Brent Southard) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 25 In article <246400012@uxa.cso.uiuc.edu> mms00786@uxa.cso.uiuc.edu writes: > >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. (Hasn't this same question appeared here before?) You have 4 Mb of memory, but most likely 640k of DOS (Conventional) memory. This is the memory which GlobalCompact() works with, thus the 280k being returned is most likely correct. Remember, DOS, device drivers, TSRs, and Windows itself are all sharing this memory. If you want to paint a more global picture of your memory resources you will have to make some EMS calls to determine how many free/total pages are available. brent -- brent southard (313) 656-8349 | oh mona mona ImageTech Corp (313) 362-3141 | you can close your eyes | i've got a twelve gauge surprise usenet: ...!well!brent | waiting for you -- James Taylor