Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!dalcs!dalegass From: dalegass@dalcs.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo Pascal : Need more variable space Message-ID: <2399@dalcs.UUCP> Date: Wed, 11-Feb-87 19:09:57 EST Article-I.D.: dalcs.2399 Posted: Wed Feb 11 19:09:57 1987 Date-Received: Thu, 12-Feb-87 04:35:52 EST References: <1443@tekigm2.TEK.COM> Organization: Dept. of Math., Stats & C.S., Dalhousie University, Halifax, N.S., Canada Lines: 42 Keywords: turbo, pascal, variable, memory Summary: All memory is available through dynamic allocation In article <1443@tekigm2.TEK.COM>, timothym@tekigm2.UUCP writes: > In article <2941@vrdxhq.UUCP> bisanabi@vrdxhq.UUCP (Paul Paloski) writes: > >Is there any way for me to increase the size of the variable space in Turbo ? > >:-- Paul > >:UUCP: ...!{decuac, rlgvax, seismo, verdix}!vrdxhq!bisanabi > Turbo only restricts you to 64K for the global data segment. I.E. Variables declared outside of any procedures. Within each procedure I believe you can have 64K. Also, using dynamic variable allocation, you can access any amount of arrays as long as each is less than 64K. e.g. (Forgive my style, it's been awhile since I used pascal...) type big_array = array[1..27,1..27,1..27] of integer; big_ptr = ^big_array; var a,b,c,d,e: big_ptr; begin new(a); new(b); new(c); new(d); new(e); {allocate the variables} . . . From this point on you can access any of the above arrays. Note that you must access them as 'a^' and 'b^', because a-e are merely points to the arrays. > > No: Symbol table space is limited to 64k in more compilers than you can shake > a stick at. Even some 'GOOD' C compilers capable of HUGE Memory models. This is not quite right... I believe that most compilers restrict you to 64k for the global variables, and 64k per array. However, in most you can access the full memory using dynamic allocation (or large memory models.) Hope this helps... dalegass@dalcs dalegass@dalcsug