Program too large problem....

Ross Oliver rosso at sco.COM
Sat Jul 2 17:11:57 AEST 1988


In article <102 at psych.psy.uq.oz> robert at psycho (Robert Dal Santo) writes:
>ENVIRONMENT:
>
>    Running xenix 2.2.1 on a 6 Mhz AT with 3.2Mb I have encountered a 
>    problem in running a program - "too big" (from sh).  Size gives me:
>
>	program:  124937 + 51766 + 17914 = 194617 = 0x2f839
>
>PROBLEM:
>
>    The exec returns with
>
>	errno = 12  (ENOMEM?)

ENOMEM can mean that your first data segment exceeds 64K. For a
middle model program, the DATA and BSS segments (second and third
numbers reported by size(CP)), in addition to your stack and
environment variables, must total 64K or less.  In this case,
the sum is greater than 64K, which is why exec is returning ENOMEM.
In this case, you need to either reduce the amount of data in your
program, or go to large model.  If your program already is large
model, this can still be the problem if you have a large stack, or
a large number of environment variables.  For large model programs,
the easiest way to fix this problem is by using the -Mt flag when
compiling.  Try starting with -Mt1024, and reduce the number until
your program works.

Ross Oliver
SCO Technical Support



More information about the Comp.unix.xenix mailing list