Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ceres.physics.uiowa.edu!news.iastate.edu!sharkey!bnlux1.bnl.gov!kushmer Newsgroups: comp.lang.pascal Subject: Re: Help! dos calls in tp Message-ID: <1991Apr20.154933.20373@bnlux1.bnl.gov> From: kushmer@bnlux1.bnl.gov (christopher kushmerick) Date: Sat, 20 Apr 1991 15:49:33 GMT References: <1991Apr19.131120.715@bsu-ucs.uucp> Organization: Brookhaven National Laboratory, Upton, NY 11973 Lines: 41 In article <1991Apr19.131120.715@bsu-ucs.uucp> 01mdschnapf@bsu-ucs.uucp writes: >I need help desperately. I am writing a program for my semester project >and ran into a hurdle that I can't cross. I am making a menu program ... Make sure that in any programs that use exec, that they only allocate as much heap/ stack space as they will need. If you do not specify, then the pascal program will allocate all available memory as heap space, and something like 64KByte of stack space even if you don't do a single memory allocation (getmem, New()) and even if your program only needs 2048 of stack. Use the following {$M 2048,0,0} This gives you a 2048 stack, and allocates no heap for you program. Of course if your program does use the heap, you'll need to do a rough calculation of how much, and then adjust the second two parameters accordingly. See the docs for discussion of {$M} Also make sure stack checking is on, so that if you do need substantial stack space, you can adjust the first parameter accordingly (just keep doubling it until you no longer get a run time stack crash error.) -- Chris Kushmerick kciremhsuK sirhC kushmer@bnlux1.bnl.gov <===Try this one first kushmerick@pofvax.sunysb.edu -- Chris Kushmerick kciremhsuK sirhC kushmer@bnlux1.bnl.gov <===Try this one first kushmerick@pofvax.sunysb.edu