🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1277

Re: Porting software to the PC, 64K data structure barrier.

#1277
From: Conor P. Cahill
Date: Sun, 30 Jun 1991 14:37
32 lines
1933 bytes
avinash@felix.contex.com (Avinash Chopde) writes:

>Now, I'm sure I'm doing something wrong, surely there must be some
>way of defining large arrays.

Most DOS compilers have a "huge" model that allows definition of data
elements that are larger than 64k. 

>(If not, will malloc() support allocation of large arrays ?)

Malloc is usually limited by the model you choose (and by the size of it's
arguement (i.e. 16 bit unsigned int == 64K).

>Looks like it is not going to be an easy job, porting programs to the PC,
>and I would be glad for any help anybody can offer regarding what I could
>do, and what I should watch out for.

This is an understatement.  One of the hardest things to get used to 
is that you can easily run out of memory.  On a totally bare bones system
you start out with 640 K.  Take off 70K or so for DOS and command.com 
and that leaves you with a max size of around 570K - not much in 
todays world. 

I would look at redesigning your application such that you didn't need 
super-large data elements (although you can have multiple data segments
that total to more than 64K).  The nice thing about this is that you
could then use LIM EMS to page segments to expanded memory.
-- 
I guess these are the views of VTI - since it is my consulting company.

Conor P. Cahill              (703)430-9247              uunet!virtech!cpcahil 
Virtual Technologies, Inc.  46030 Manekin Plaza            Sterling, VA 22170 
Technical Details
Message-ID: <1991Jun30.143757.14459@virtech.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uunet!virtech!cpcahil
References: <1972@contex.contex.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uunet!virtech!cpcahil
From: cpcahil@virtech.uucp (Conor P. Cahill)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: Porting software to the PC, 64K data structure barrier.
Keywords: PC, 64K struct size limitations, MSDOS
Message-ID: <1991Jun30.143757.14459@virtech.uucp>
Date: 30 Jun 91 14:37:57 GMT
References: <1972@contex.contex.com>
Organization: Virtual Technologies Inc.
Lines: 32