Problems allocating 300k data structure using Turbo C
Scott Micheal Kemp
kemps at prism.CS.ORST.EDU
Sat Mar 16 09:01:33 AEST 1991
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 at prism.cs.orst.edu | The only way to die! ]
=== Computer Sc., Oregon St. Univ. /|\------------------------------]
More information about the Comp.lang.c
mailing list