gm@romeo.cs.duke.edu (Greg McGary) (12/24/88)
I just began trying to build some TeXware with TP-5.0 and was surprised to
find no mention of memory models in the TP manuals. I expected to see full
support for tiny, small, medium, compact, large and huge models just like
in Turbo-C. Instead, I was hit with rude error messages saying I couldn't
have any more than a total of 64K for global variables and 64K for locals.
What's going on here? Does Microsoft Pascal have these limits?
-- Greg McGary
-- 4201 University Drive #102, Durham, NC 27707 (919) 490-6037
-- {decvax,hplabs,seismo,mcnc}!duke!gm
-- gm@cs.duke.eduwei@hpctdls.HP.COM (Bill Ives) (01/06/89)
Turbo pascal 5.0 has only large memory model as far
as I know. The restriction on code and data is 64K each
per unit. Thus if you require more than 64K worth of
global variables, extend their definition accross units --
this isn't really much to ask since you should modularize
your programs anyway. Further, if you absolutely require
a data structure larger than 64K, I believe you can use
new() ( or some special routine, I don't have my manuals here )
to allocate it from the heap, which is limited only by the
amount of memory in your system.
Hope this helps..
Bill Ives
HP Colorado Telecommunications Division
Disclaimer: These are my opinions only, blah, blah....