Article View: comp.os.msdos.programmer
Article #117Re: HELP: bloated BC++ program (one of us needs relief...)
From: Larry Gajdos
Date: Mon, 02 Nov 1992 15:19
Date: Mon, 02 Nov 1992 15:19
33 lines
1911 bytes
1911 bytes
In comp.os.msdos.programmer, sam4628@zeus.tamu.edu writes: > I have a small program (source below) which basically runs a COMMAND > shell. When in this shell, I do a MEM /C | MORE to check the size of > the program, which turns out to be about 65702 bytes!!! The executable > is only a couple of K! For the record, the parent program which this > is distilled from is over 27K, but still takes up 65702 bytes according > to MEM. The specs are: > BC++3.1, Tiny memory model, no debugging info, optimized for size > MSDOS 5.0, 486DX33... > Is this normal in some bizarre way? If so, is it fixable? I'd > appreciate any suggestions!!! Some relevant but unspecific comments: 1. There should be a link option to reduce program size. For example, Microsoft Link has the /CPARMAXALLOC:n option to set the max number of 16-byte paragraphs needed by the program. (EXEHDR can change this value.) 2. You may be able to shrink your shell even further by linking in dummy .OBJ's for unused runtime functions, such as argv processing. Again in the Microsoft context, you would write your own dummy _setargv routine. (Don't replace the environment processing - _setenvp - since that's needed for your spawn/exec routine.) 3. I'm sure there are other tips that are relevant, so you might want to investigate further. Larry Gajdos Not speaking for HP
Technical Details
Message-ID:
<15310017@hpavla.lf.hp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hpscdm!hplextra!hpcss01!hpwala!hpavla!gajdosReferences:
<22OCT199219515621@zeus.tamu.edu>Show Full Headers
Complete Article Headers
From: gajdos@hpavla.lf.hp.com (Larry Gajdos) Date: Mon, 2 Nov 1992 15:19:07 GMT Subject: Re: HELP: bloated BC++ program (one of us needs relief...) Message-ID: <15310017@hpavla.lf.hp.com> Organization: Hewlett-Packard Little Falls Site Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hpscdm!hplextra!hpcss01!hpwala!hpavla!gajdos Newsgroups: comp.os.msdos.programmer References: <22OCT199219515621@zeus.tamu.edu> Lines: 33