Article View: comp.os.msdos.programmer
Article #2169Re: Turbo C++ and Extended Memory, Huge model, large data structs
From: Walter Bright
Date: Wed, 12 Sep 1990 18:49
Date: Wed, 12 Sep 1990 18:49
24 lines
1899 bytes
1899 bytes
In article <ajai.653069128@talos.sce.carleton.ca> ajai@sce.carleton.ca (Ajai Sehgal) writes: <I'm writing an application in Turbo C++ which requires large data structures, <ie an array of dimension 1,500,000 bytes (to hold a 512 x 512 image in real <format). I thought I could use farmalloc to allocate a large chunk of memory <and then use ponters to store and retrieve the data. The problem I encounter <is the lack of memory access to memory above 640K. Can Turbo C++ make use of <extended memory other than for overlay swapping? Is there a solution with <Turbo C++ ? If not How about Zortec C++, I'm in early development so if I have <to switch I will. Is Zortech better? Zortech C++ supports the development of applications using the Rational DOS Extender. This gives the program the capability to directly access up to 16Mb of memory (it runs the program in 286 protected mode). You will need to purchase the Rational DOS Extender in addition to the Zortech compiler to do this. Call Zortech at 800-848-8408 for more info. You still cannot declare or allocate a single object that consumes more than 64k, even in protected mode. For your application, I suggest instead allocating 512 arrays of 512 bytes each, as in: char *array[512]; for (i = 0; i < 512; i++) array[i] = (char *) malloc(512); P.S. I wrote the compiler.
Technical Details
Message-ID:
<2708@dataio.Data-IO.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!julius.cs.uiuc.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!pilchuck!dataio!brightReferences:
<ajai.653069128@talos.sce.carleton.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!julius.cs.uiuc.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.os.msdos.programmer Subject: Re: Turbo C++ and Extended Memory, Huge model, large data structs Keywords: Turbo C, Huge Extended Memory Message-ID: <2708@dataio.Data-IO.COM> Date: 12 Sep 90 18:49:56 GMT References: <ajai.653069128@talos.sce.carleton.ca> Organization: Data I/O Corporation; Redmond, WA Lines: 24