decalring large arrays

Dalton Porter jdp at engr.uark.edu
Mon Jun 24 08:14:01 AEST 1991


tomr at maccs.dcss.mcmaster.ca (Rickey Thomas Tom) writes:

>I have a simple question. I sort some data. The easiest way to do this is to 
>decalre a large array to sotre this data and then sort the array. However,
>it apopears that in a DOS environment, I am only allowed an array up to 64 K in size. Is there a way to declare larger arrays than this for sort. Is there another way that I could store a large quantity of data for sorting.
>
>Any comments would be appreciated. Thanks in advance.
>
>Rick

I have used this ugly solution....
char huge *data;
unsigned long size=DATASIZE;
.....

....
data=(char huge *)farcalloc(size,sizeof(char));
/*access like this*/
*(data+i)=whatever;

/*                                                   
   Dalton Porter, University of Arkansas, Fayetteville
                  Dept. of Electrical Engineering
   E-Mail -> jdp at engr.uark.edu
   "I would get up but the boy crippled me."
				-Homer Simpson 
*/ 



More information about the Comp.lang.c mailing list