Xref: utzoo comp.lang.c:40199 comp.lang.c++:14204 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!caen!uflorida!SORROW@MAPLE.CIRCA.UFL.EDU From: sorrow@oak.circa.ufl.edu Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: decalring large arrays Message-ID: <0094A521.858B9BC0@MAPLE.CIRCA.UFL.EDU> Date: 18 Jun 91 22:19:54 GMT References: <285B94A3.25253@maccs.dcss.mcmaster.ca>,<1991Jun18.205921.20757@ux1.cso.uiuc.edu> Sender: news@uflorida.cis.ufl.EDU Reply-To: sorrow@oak.circa.ufl.edu Organization: University of Florida CIRCA VAX Cluster Lines: 28 In article <1991Jun18.205921.20757@ux1.cso.uiuc.edu>, gordon@osiris.cso.uiuc.edu (John Gordon) writes: |>tomr@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. Sounds fair. However, in a DOS environment, you may have to use fmalloc() or farmalloc() depending on the memory model and compiler. Actually, this MAY be legal (never tried it, but what the hell): void main ( void ) { char *TheArray=(char *)malloc(BIG_NUMBER); char TheArrayAgain[]=TheArray; // Is this legal? } /* Brian Hook -- MS-DOS Programmer for Contract ----------------------------------------------------------------- "Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN inches....better save the women and children first...but this one goes to 11! ..anymore of that plutonium nyborg?....there can be only ONE!....like a finger pointing to the moon....ease the seat back...one day closer to death */