c/8559: Tru64 gcc -O3 hogs memory on Perl 5.8.0's toke.c
Wed Nov 13 07:26:00 GMT 2002
>Synopsis: Tru64 gcc -O3 hogs memory on Perl 5.8.0's toke.c
>Arrival-Date: Wed Nov 13 07:26:00 PST 2002
>Originator: Jarkko Hietaniemi
>Release: gcc version 3.2.1 20020922 (prerelease)
HP/Compaq Tru64 4.0F/5.1A
The -O3 optimizer of gcc 3.2.1-to-be consumes quite
a bit of memory in Tru64 when optimizing the toke.c
of Perl 5.8.0. It seems that process datasize limit
64 megabytes as the per-process datasize resource limit
is not enough with -O3 (which is the default
optimization level for gcc with Perl 5.8.0).
The Perl 5.8.0 source code is available at
It unpacks to directory perl-5.8.0, cd there,
configure with "sh Configure -des -Dcc=gcc".
The process datasize can be viewed and changed
(when using tcsh) by "limit" and "limit datasize 64M".
This is what happens with process datasize set to
$ make toke.o
`sh cflags "optimize='-O3'" toke.o` toke.c
CCCMD = gcc -DPERL_CORE -c -ansi -fno-strict-aliasing -DLANGUAGE_C -O3 -Wall
cc1: Cannot allocate 9139200 bytes after allocating 62192032 bytes
make: *** [toke.o] Error 1
128 MB as the process datasize seems to be
enough to use -O3 for optimizing the toke.o.
Another workaround is that if one drops the
optimization to -O2, gcc does not run out of
the 64 MB limit. (This can be achieved by e.g.
"sh Configure -des -Dcc=gcc -Doptimize=-O2.)
Tested to fail both in Tru64 releases 4.0F and 5.1A,
with the same gcc 3.2.1 prerelease.
See How-To-Repeat for workarounds.
More information about the Gcc-bugs