Xref: utzoo comp.lang.c:32302 comp.os.msdos.programmer:1174 Newsgroups: comp.lang.c,comp.os.msdos.programmer Path: utzoo!utgpu!sarathy From: sarathy@gpu.utcs.utoronto.ca (Rajiv Sarathy) Subject: Child processes in Mess-Dos Message-ID: <1990Sep28.234836.17868@gpu.utcs.utoronto.ca> Summary: Use Overlays! (NON MS-DOS PEOPLE PLEASE HIT n) Organization: UTCS Date: Fri, 28 Sep 90 23:48:36 GMT Since I posted the original article to both c.l.c and c.o.m.p, I've posted the summary to both also. Henceforth, I'll only use the latter, as should anyone else asking about MS-DOS related things, IMHO. Flames to /dev/null. A couple of weeks ago, I posted an article asking for opinions on using various techniques to reduce the amount of code sitting in memory from a very large application. Some of the options I suggested were: a) Overlays b) using MS C's "spawn" c) using MS C's "exec" d) using MS C's "system" I also gave some obvious pros and cons of each. Several people responded. I've decided that my initial hunch, using overlays, is the best choice despite its drawbacks (time to load/unload, MS Linker's inability to optimize modules automatically, inability to use some functions in more than one module, etc.). Some people suggested using Borland's VROOM (included with C++). As toma@tekgvs.LABS.TEK.COM (Tom Almy) posted, VROOM will not work with MS OBJs. (This according to a friend who sells Borland products but isn't a programmer ;-) Others were under the impression that spawn and exec load an additional copy of COMMAND.COM. I didn't test to see if this is true, but I doubt it. The manual makes no mention of it, and MS Tech Support in Canada didn't think so either. We were both under the assumption that the new process is just loaded into higher memory in the case of spawn (with P_WAIT), and loaded on top of the caller in the case of spawn (with P_OVERLAY), and exec. The system call, however, does execute another command interpretor. Thanks for everyone's help. -- Rajiv Partha Sarathy _ _ /@\ INTERNET sarathy@gpu.utcs.utoronto.ca ................ooooooooOOOO(_)(_)\@/ BITNET sarathy@utorgpu.bitnet University Of Toronto Computing Services UUCP sarathy@utgpu.uucp