divo@hpvcfs1.HP.COM (Mark Divittorio) (02/15/89)
I am having a problem with 286/386 WIndows. I have a very simple program that allocates ~ 2K of memory from the gloabal heap and keeps it locked throughout the life of the program. Runs fine on a 286 machine with expanded memory. I have run SHAKER and HEAPWALKER and have not been able to produce any bizarre behavior. I then try running on a 386 COMPAQ with 3M of memory. The program runs fine and behaves correctly, but ....... When blipping the DOS window I get an error message that there is not enough memory to display the directory. An ABOUT shows the proper (close) amounts of conventional and expanded memory. Disc space is another issue. I should have ~20M free, but it shows 60M (it is a 40M drive). What am I doing (not doing) to cause this ? The Compaq uses caching (grabbing at straws). Do I need to compile in a special mode that allows 286/386 transportability ? I am using MS C5.1 compiler and SDK. Any help ? Mark DiVittorio Lost in a C of confusion ... att!hpfcla!hpvcla!divo
beckman@dev386.UUCP (Zacharias Beckman) (02/16/89)
In article <1850002@hpvcfs1.HP.COM>, divo@hpvcfs1.HP.COM (Mark Divittorio) writes: > When blipping the DOS window I get an error message that there is not enough > memory to display the directory. An ABOUT shows the proper (close) amounts > of conventional and expanded memory. Disc space is another issue. I should > have ~20M free, but it shows 60M (it is a 40M drive). One reason for this could be that you have locked the global memory for the duration of your application. This is considered a HORRIBLE NO-NO. It has the effect of creating a brick wall in memory, thereby making it difficult for other applications to request large chunks of memory. Try unlocking it when you give up control of your application. BTW, the About box will only show an approximation of available memory; it is subject to errors due to fragment- ation of memory. I've no clue as to the disk space problem, though... Zacharias J. Beckman ... gatech!mdt!pgthor!dev386!beckman ... uunet!mcrware!pgthor!dev386!beckman (319) 354-5116 (319) 351-1993 Ink: A villainous compound of tannogallate of iron, gum-arabic, and water, chiefly used to facilitate the infection of idiocy and promote intellectual crime.
divo@hpvcfs1.HP.COM (Mark Divittorio) (02/23/89)
Thanx for the Global memory warning. I have revised things to allocate a small local heap and allocate from there. All seems to be in order now. Thanx for the memories ......... Mark DiVittorio att!hpfcla!hpvcla!divo