Turbo C large character array

Chris Schoeneman jindak at surfside.sgi.com
Wed Aug 1 02:00:11 AEST 1990


In article <1990Jul30.204053.28769 at ux1.cso.uiuc.edu>
 gordon at osiris.cso.uiuc.edu (John Gordon) writes:
>
>	Well, I managed to solve my problem, with thanks to all who posted and 
>e-mailed me suggestions.  The final solution:
>
>	char huge menu[1200];
>
>	for(i = 0; i < 1200; i++)
>		menu[i] = farmalloc(80);

Almost.  But

        char huge *menu[1200];

might work a little better.  Why not just malloc the whole thing?
'Huge' arrays can be larger than 64K, they just can't be static.

        char huge *menu;

        menu=(char*) farmalloc(1200*80);

should do what you want.

	       Chris Schoeneman | I was neat, clean, shaved and sober,
    jindak at surfside.esd.sgi.com | and I didn't care who knew it.
	 Silicon Graphics, Inc. |		-Raymond Chandler
	      Mountain View, CA |		 (The Big Sleep)



More information about the Comp.lang.c mailing list