Subject: Re: Virtual memory exhausted?
To: Aaron J. Grier <agrier@poofygoof.com>
From: Collin Baillie <sanac@optushome.com.au>
List: port-pmax
Date: 04/19/2002 07:39:38
> On Wed, Apr 17, 2002 at 09:12:37AM +1000, Collin Baillie wrote:
> > Hey guys,
> >
> > While trying to compile the ldmud driver, version 3.2-dev-404, I get
this
> > error:
> >
> > cc -O4 [...]
>
> I've occationally run into problems with gcc's optimizer wanting tons of
> memory when heavily optimizing...
>
> a few options
>
> - ulimit -m unlimited
> - new(er) gcc without optimizer bugs
> - compile with lower optimization level
>
> one of 'em is bound to work.  ;)
>

Yeah, read that somewhere. So I removed the optimization flags. It seemd to
get further but then gets a bunch of "branch out of range" errors from the
assembler!

ulimit -v unlimited (or indeed ulimit -v anything) doesn't seem to work with
bash2.0.5 :( It just says:

bash: ulimit: cannot modify limit: Invalid argument

Weird. The man pag for bash says its units are kilobytes. It also says that
they should be in 1024 byte increments.

ulimit -Hv gives:

294912

and ulimit -Sv gives:

33792.

So soft limits are 33MB and hard limits are 288MB. But I cannot seem to
change soft limits. ulimit -m unlimited worked so I tried compiling it
again. Same error. Tried compiling it in csh after running unlimit. Memory
usage went up to 125MB! Then it dropper to &) then got to the assembler
stage and was using about 5MB and I got those same assembler errors:

/tmp/ccmIM6X3.s: Assembler messages:
/tmp/ccmIM6X3.s:28764: Error: Branch out of range
/tmp/ccmIM6X3.s:28897: Error: Branch out of range
/tmp/ccmIM6X3.s:29112: Error: Branch out of range
/tmp/ccmIM6X3.s:29159: Error: Branch out of range
/tmp/ccmIM6X3.s:29170: Error: Branch out of range
/tmp/ccmIM6X3.s:29182: Error: Branch out of range
.
<snip about 100 lines>
.
/tmp/ccmIM6X3.s:107805: Error: Branch out of range
/tmp/ccmIM6X3.s:109797: Error: Branch out of range
/tmp/ccmIM6X3.s:109852: Error: Branch out of range
/tmp/ccmIM6X3.s:109925: Error: Branch out of range
/tmp/ccmIM6X3.s:110063: Error: Branch out of range
/tmp/ccmIM6X3.s:111592: Error: Branch out of range
*** Error code 1

Stop.


So, unlimit gave it the memory to go thru the high optimization, but once it
gets to the assembler stage, it fails.

Is this likely to be an issue with the package I am compiling, or a problem
with the gcc/assembler for pmax?

Collin