[comp.lang.c] Child processes in Mess-DOS, and/or reducing code size

sarathy@gpu.utcs.utoronto.ca (Rajiv Sarathy) (09/20/90)

Problem: a program that's too large to fit in memory.
Environment: C language in MS-DOS 3.x
Solution: break it down

	Options:
		- overlays (my #1 choice)
		- C spawn function (call another .exe module)
		- C exec function (call another .exe module)
		- C system function (call another .exe module)

What other options are there, and what are the pros and cons of these and
the ones listed above?

The problem with overlays (atleast with MSC 5.1) is that one module can't
appear in more than one overlay, so there's no way of guaranteeing that
a module isn't reloaded several times.  Or am I wrong?

The problem with the other three is that data passing becomes a hassle, and
is no longer transparent.  It forces us to decide EXACTLY what we want 
passed.  This is what we should be doing anyway, but can sometimes be a 
hassle.  (ie. if there are a lot of global constants/variables).

Any ideas?

-- 

 Rajiv Partha Sarathy         _  _ /@\    INTERNET sarathy@gpu.utcs.utoronto.ca
 ................ooooooooOOOO(_)(_)\@/      BITNET sarathy@utorgpu.bitnet
 University Of Toronto Computing Services     UUCP sarathy@utgpu.uucp

spolsky-joel@cs.yale.edu (Joel Spolsky) (09/20/90)

In article <1990Sep19.224551.27226@gpu.utcs.utoronto.ca> sarathy@gpu.utcs.utoronto.ca (Rajiv Sarathy) writes:
>Problem: a program that's too large to fit in memory.
>Environment: C language in MS-DOS 3.x

The easiest way to solve this problem:

(1) Rush out and buy Borland Turbo C, and use its linker.
(2) Use VROOM. It will do all the housework you need for overlays
    automatically. Just divide your code up into segments and it will
    automatically make sure that any segments that are in use are
    loaded. It can even swap stuff into extended memory...

Simple and elegant.

In fact, you don't even need to buy Turbo C, just the Turbo Assembler
Debugger, which comes with TLINK, the linker, the latest version of
which will compile Microsoft .OBJ's fine.

Joel Spolsky
spolsky@cs.yale.edu                                     Silence = Death