Ubuntu

very large memory usage when compiling with optimizations

Reported by Jean-Paul Calderone on 2008-01-30
2
Affects Status Importance Assigned to Milestone
gcc-4.2 (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: gcc-4.2

release of Ubuntu:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)"

version of the package:

Version: 4:4.2.2-1ubuntu2

what happened:

Compiling the source file which (hopefully) will attach to this report uses a large amount of memory with this version of gcc, whereas this did not use to be the case. "large amount" is roughly a gigabyte. Previously it used about 100 megabytes. This only happens when -O1 or higher is specified for compilation.

Jean-Paul Calderone (exarkun) wrote :

The gcc command line which produces the behavior is this:

gcc -c -O1 bugreport.c -o bugreport.o

The only unusual external requirement is Python.h from python2.4. It should be no problem to use the Python 2.5 version instead, just edit the #include.

Matthias Klose (doko) wrote :

this is a known issue with gcc-4.2; please could you recheck with gcc-4.3 from the ubuntu-toolchain PPA?
See https://launchpad.net/~ubuntu-toolchain/+archive

Changed in gcc-4.2:
importance: Undecided → Medium
status: New → Incomplete
Jean-Paul Calderone (exarkun) wrote :

gcc 4.3 seems to be an improvement over gcc 4.2:

scmikes@bigdog3:~$ time gcc-4.3 -c -O1 bugreport.c -o bugreport.o
bugreport.c: In function ‘pypy_g_ll_time_ll_time_time’:
bugreport.c:24724: warning: passing argument 2 of ‘gettimeofday’ from incompatible pointer type

real 0m5.948s
user 0m5.312s
sys 0m0.116s
scmikes@bigdog3:~$

Matthias Klose (doko) wrote :

won't fix in gcc-4.2.

Changed in gcc-4.2:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments