decalring large arrays

J. Horsmeier jos at and.nl
Wed Jun 19 20:39:16 AEST 1991


In article <1991Jun18.205921.20757 at ux1.cso.uiuc.edu> gordon at osiris.cso.uiuc.edu (John Gordon) writes:
>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.
>
>	Don't declare it as an array.  Declare it as a pointer and malloc()
>it in the program.

It won't work either, I think the poor soul is working on a PC (64K lims).
size_t is defined as an int there. An int is 16 bits on these kinda machines.
If I'm not mistaken, MSC has a function called halloc(). The 'h' stands for
'huge'. Maybe that helps ...

Our sun is not the only star in the universe. 
Our planet is not the only planet spinning 'round a star. 
Our planet is not the only planet with 'intelligent' life forms
on it in the universe. 

But our planet *IS* the only planet in the universe where they use MSDOS!

Jos


|O   J.A. Horsmeier AND Software B.V.        phone : +31 10 4367100   O|
|O                  Westersingel 106/108     fax   : +31 10 4367110   O|
|O                  3015 LD  Rotterdam NL    e-mail: jos at and.nl       O|



More information about the Comp.lang.c mailing list