Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!cernvax!ethz!srp From: srp@ethz.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Microsoft C 4.0 spawn is a memory hog Message-ID: <99@bernina.UUCP> Date: Fri, 29-May-87 01:12:00 EDT Article-I.D.: bernina.99 Posted: Fri May 29 01:12:00 1987 Date-Received: Sat, 30-May-87 11:04:32 EDT References: <3605@osu-eddie.UUCP> <222@idacrd.UUCP> Reply-To: srp@bernina.UUCP (Scott Presnell) Organization: Chem. Dept., Swiss Federal Inst. of Tech. (ETH-Zurich) Lines: 37 In article <222@idacrd.UUCP> mac@idacrd.UUCP (Bob McGwier) writes: >in article <3605@osu-eddie.UUCP>, mdf@osu-eddie.UUCP (Mark D. Freeman) says: >> >> We have a program called memfree.exe that just prints out the >> available memory. Memfree always agrees with chkdsk. >> >> We wrote a program that does nothing but spawns memfree and returns. >> Running memfree from dos shows 70K more available than running memfree >> from our spawn test program (that is, of course, running under dos). >> >> Why does spawn eat up 70K? Is there a way around this? >I assume you'd like to be able to call disk files, do commands etc when >you run spawn so you have to have a copy of the command processor loaded >into memory for one thing. > >Bob I believe that this is incorrect. Spawn does not call command.com, that is a job for system(). As an example, try spawning a batch file -- I don't think it will work. Some of the things that are in those 70k are 1) Open file (and pointers) table, 2) Personal copy of the environment (though on my machine that comes to a measly 0x22d bytes). The rest?? who knows -- (really, anyone know?) -------------- Scott Presnell Swiss Federal Institute of Technology (ETH-Zentrum) Department of Organic Chemistry Universitaetsstrasse 16 CH-8092 Zurich Switzerland. uucp: ...seismo!mcvax!cernvax!ethz!srp (srp@ethz.uucp) earn/bitnet: Benner@CZHETH5A