Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!psuvax1!uwm.edu!ogicse!usenet!prism.CS.ORST.EDU!kemps From: kemps@prism.CS.ORST.EDU (Scott Micheal Kemp) Newsgroups: comp.lang.c Subject: Problems allocating 300k data structure using Turbo C Message-ID: <1991Mar15.230133.16073@lynx.CS.ORST.EDU> Date: 15 Mar 91 23:01:33 GMT Sender: @lynx.CS.ORST.EDU Reply-To: kemps@prism.CS.ORST.EDU (Scott Micheal Kemp) Distribution: usa Organization: Oregon State Univ. -- Computer Science Lines: 30 Nntp-Posting-Host: prism.cs.orst.edu Machine: IBM 386 Compiler: Turbo C++ Problem: Need to make an array larger than 64k. Specifically, I need to create a dynamic array of a 10 byte structure which will need over 300k. First, can you tell me if this is the correct declaration of my array: POINTS huge *points; What about this? POINTS huge (*points)[]; Now I need to create memory for this array. I assume I need to use farmalloc. How do I type cast the pointer returned by farmalloc to my pointer to the dynamic array? Lastly, what memory model do I need to use with Turbo C? My code is "small", and the rest of the data (except the 300k structure) is "small", so do I use "small", or do I need to use "huge"? Thanks for your help. |-------------------------------] ================ Scott Michael Kemp | Midician by Profession... ] ============ kemps@prism.cs.orst.edu | The only way to die! ] === Computer Sc., Oregon St. Univ. /|\------------------------------]