Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!agate!shelby!portia.stanford.edu!dhinds From: dhinds@portia.Stanford.EDU (David Hinds) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Increase run-time stack size Message-ID: <1990Jul2.165001.15492@portia.Stanford.EDU> Date: 2 Jul 90 16:50:01 GMT References: <32559@ut-emx.UUCP> <100010006@hpcupt1.HP.COM> <1990Jul2.011448.19220@Octopus.COM> Organization: AIR, Stanford Universit Lines: 22 In article <1990Jul2.011448.19220@Octopus.COM> stever@octopus.UUCP (Steve Resnick ) writes: >In article <100010006@hpcupt1.HP.COM> swh@hpcupt1.HP.COM (Steve Harrold) writes: >>Things that seem to go into the stack with Microsoft C programs include the >>environment table (in some memory models); thus you might want to reduce >>the number of superfluous variables in the DOS environment. >> >WHAT?????? The environment is in the data segment (as opposed to the stack >segment which may be the same segment but is addressed with SS as opposed to >DS). Changing the size of your environment should have no affect on running >programs. Stricly speaking the environment is not part of DOS. It's part of >COMMAND.COM and therefore should not affect the running of programs. Not quite true - first, the environment IS managed by DOS and is not just a feature of COMMAND.COM. Second, since the environment is put in kind of an inconvenient place (in another segment), some compilers make a copy of it to make accessing it easier. I know the Topspeed C compiler does this, and I bet Microsoft does as well. It might stick it in the stack (why? I don't know). So, the size of the environment does matter. I wouldn't expect to get much mileage out of it, though - maybe 1K if it is really big? -David Hinds dhinds@popserver.stanford.edu