MS DOS overlay programming

Eric J Korpela korpela at
Fri Dec 29 12:13:07 CST 2006

On 12/28/06, Richard <legalize at> wrote:
> Classic case of abusing new/delete when all you need to do is declare
> an instance of init_vars on the stack...

That depends upon how large you made your stack and where it is.  This
is MS-DOS, and you're trying to reduce overall memory usage, after
all.  If a 1k stack is enough to handle your calls and returns, you
should keep large temporaries on the heap, then release the unused
portions of the heap back to the OS after initialization (assuming the
IP stack is implemented as a TSR.)


More information about the cctech mailing list