Quote:
> Greetings,
> we're using is a DELL PC with a Pentium chip (luckily we're doing no FP !)
> and will be fitted with 32 MB of RAM or so. We're using DOS 6.2 (I believe)
> and the latest WatCom V10 C/C++ compiler.
> We're only going to save 16 MB of data at a time, so there shouldn't be any
> memory shortages.
> I was hoping that like UNIX, I'd just be able to malloc() a 16 MB buffer and
> bung the data straight in. However, a colleague (of self-confessed old and
> dubious DOS knowledge) tells me that in order to access such an amount of
> memory, I need to run in protected mode and use extended (EMS or XMS) memory.
> If this true ? and if so, how do I switch to protected mode, and how so I
> access and manipulate such memory....
You already have solved the problem. Just use Watcom's 32-bit compiler
(WCL386), and let it create a DOS-Extended application (using DOS/4GW
DOS-Extender). The version of DOS4GW shipped with the compiler is limited
just to 32MB of RAM. If you upgrade your computer with more RAM, you will
have to buy a 'professional' version of DOS4GW (called 4GWPRO). The
exteder (in general) needs no EMS or XMS manager, but if you have
installed any (HIMEM, EMM386, QEMM, 386^MAX,...), the extender can
cooperate with your memory manager.
Under 32-bit flat model, you can access up to 4 gigabytes of memory. So
if you have 32MB, you can easily use malloc(16*1024*1024L) to allocate
16MB buffer (if the memory isn't fragmented).
Quote:
> Regards.
> Nick Pitfield.
All the best
--Vladimir
+-----------------------------------+------------------------------------+
| Technical University of Brno | The louder the music, |
| Czech Republic | the better the code ... |