[comp.unix.xenix] Compiling big programs; summary

rsalz@bbn.com (Rich Salz) (09/27/88)

On Friday I wrote that compiling with these flags
	-LARGE -M2ht -SEG 1000 -F 4000
resulted in the run-time error "not enough core" for programs that are
about 300K.  The "t" flag says to stuff data into a different segment if
it's bigger than a given size, the default being 32K.  I tried
	-M2l32
(went from huge to back big model, too) and it works.  I'm now playing
around to see what is a good number.

Basically all data was in the near segment.  The linker catches this if
the data is too big, but if data & stack is too big, then it doesn't get
caught until run-time.  (Isn't the stack size a command-line option, so
isn't this REAL stupid?)

Thanks to the following people for their helpful answers:
	Paul Debra <debra@alice.att.com>
	Rick Farris <rfarris@serene.cts.com>
	William G. Bunton <tntdev!wgb>
	James B. O'Connor <fsc2086!jim>
	Jack F. Vogel <jack@turnkey.TCC.COM>
	Jonathan Bayer <ispi!jbayer>
	Dr. T. Andrews <ki4pv!tanner>

Thanks for all the help!  Over the weekend we got more help and advice
from Usenet than we have from SCO over a week!  Now I just have to get
used to debugging without the symbols, because there are too many
for ADB!

I admire the fortitude of those who have to use this as their main
working environment...
	/rich $alz

Here's some additional, highly edited for space, comments from some
of the folks above.

Rick Farris:
    I use "-M2le -Mt128".

    The "-SEG 1000" seems high; on a 25K-line program I needed 192 (one
    per function, plus some for startup).  Wonder what the effects of such
    a big declaration are?

William G. Bunton:
	Start with t1024 and work down.

Tanner Andrews:
	Try re-building with "-NGT" and "-Mtnnn" and such like in order to
	cause your data to be placed in other segments.  You might also
	remove any large arrays, and malloc() them at run-time ...

	None of the proposed solutions will work if you aren't using
	"large" model.  On the other hand, I've seen precious few "large"
	model progs which actually worked.

Jonathan Bayer:
	Reconfigure to reduce allocation for disk buffers.
	Try killing other processes going on.

-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.