Xref: utzoo comp.lang.c:40283 comp.lang.c++:14264 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!dimacs.rutgers.edu!aramis.rutgers.edu!paul.rutgers.edu!njin!uupsi!sunic!ericom!eos4c39!etxmesa From: etxmesa@eos.ericsson.se (Michael Salmon) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: decalring large arrays Message-ID: <1991Jun20.082347.2354@ericsson.se> Date: 20 Jun 91 08:23:47 GMT References: <285B94A3.25253@maccs.dcss.mcmaster.ca> Sender: news@ericsson.se Organization: L.M.Ericsson Lines: 29 Nntp-Posting-Host: eos4c39.ericsson.se In article <285B94A3.25253@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. > You don't mention whether you want to sort a large number of small objects or a number of large objects. The later case can be solved by declaring an array of pointers as others heve mentioned but the limit is 16K (64K / sizeof far void *). If instead you want sort integers then you are perhaps better off investigating multiple file sorting algorithms or if it must be in memory you can use a 16K array of pointers to 16K arrays of pointers to integers. The problem here of course is that most published sort algorithms only work for single dimensional arrays. I hope that this has been some help. Michael Salmon L.M.Ericsson Stockholm Standard disclaimer.