Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!mcsun!ukc!axion!planet!prk From: prk@planet.bt.co.uk (Peter Knight) Newsgroups: comp.windows.ms Subject: Re: No free MS support for SDK; How to use lots of mem in a Win program? Message-ID: Date: 21 Aug 90 08:07:16 GMT References: <1990Aug19.132046.24146@eng.umd.edu> Sender: usenet@planet.bt.co.uk (Usenet News Manager) Organization: RT743, BT Research Labs, Martlesham Heath, Ipswich, UK. Lines: 45 burgoyne@eng.umd.edu (John R. Burgoyne) writes: >The question I am trying to get answered is the following. How do we go about >using large amounts of memory in our programs we develop with SDK version >3.0? I am using MS C compiler 6.0, SDK version 3.0, Windows version 3.0. The >MS Windows SDK book "Tools" says on page 1-3 that the compact and large >models are not recommended for Windows programs because data segments of >programs created with compact or large models are fixed, and because only one >instance of such programs can be run. If anyone can answer any of the >following questions, I would be very happy if you do so. >Can one use the medium model and have data larger than 64K if it is global? No, the compiler will have no code to change the ds register. However, your program can have more 64K data by using both global and stack data and by using calls to the far malloc, if available. >Can one use the medium model and have global arrays larger than 64K? Yes and no. You can only manipulate these arrays if they are gotten by using the far malloc call. They will have to be accessed by pointers declared huge. I cannot give a definitive answer if these services will work check all your documentation for memory allocation (likely to be different) in windows and also for huge data types and pointers in the C manuals. >Is it ever possible to have arrays larger than 64K? Yes, see rest of reply. >What is the general strategy for using lots of memory in a Windows program? You could use the expanded memory manager. >Has anyone written a program which uses more than 640K? What are you doing >and how did you do it? Use OS/2! Peter Knight BT Research Tel +44 473 644108 #include