Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!indri!polyslo!vlsi3b15!lehi3b15!lafcol!pilgrimk From: pilgrimk@lafcol.UUCP (Kenwyn A. Pilgrim) Newsgroups: comp.lang.pascal Subject: Re: Question about Turbo Pascal's Exec Keywords: Turbo Pascal v4.0 exec Message-ID: <1092@lafcol.UUCP> Date: 10 May 89 01:27:25 GMT References: <5708@cs.Buffalo.EDU> <25135@ames.arc.nasa.gov> Distribution: usa Organization: Academic Computer Center, Lafayette College Lines: 34 (pcsuprt group) writes: # When using the EXEC command be sure to pay attention to the memory. # Since the pascal program remains resident, you have that # much less memory to play with. In particular, I have had to set the # stacksize to the maximum ( 65520 bytes ) in order to use # exec in a program I wrote. I used the compiler directive {$M 65520,0,65536}. # Also, when testing the program compile it to disk instead of memory to # make more RAM available to Exec. # # Dave Silvestro, Sterling Software, NASA/Ames Research Center I have used {$M 2048,0,0} successfully. What that means is that 2048 bytes is reserved for the stack of the calling program. You've got your facts WRONG! The compiler directives refer to the amount of memory reserved for the CALLING program, NOT the program which is called by the Exec procedure. In the example above, no heap is reserved, since the CALLING program used none of TP40's dynamic routines. Try using the following and see what happens: {$M $FFFF,0,655360} then invoke the command interpreter (command.com). If this is successful (probably not, should get an error code of 8: not enough memory) then check to see how much mem is left. Disclaimer: I'm didn't write the compiler so I may be wrong! -Kenwyn (btw what is btw?)