c++/1014: Virtual memory exhausted while compiling small program

kosak@cs.cmu.edu kosak@cs.cmu.edu
Thu Dec 7 19:46:00 GMT 2000


>Number:         1014
>Category:       c++
>Synopsis:       Virtual memory exhausted while compiling small program
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 07 19:46:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Corey Kosak
>Release:        gcc version 2.97 20001127 (experimental)
>Organization:
>Environment:
System: Linux doctor.home 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown
Architecture: i686
>Description:
An attempt to compile this file with -O results in the error
"Virtual memory exhausted!" on a 512M machine.

Notes:

- This isn't a large struct problem.  The structs are all
empty except for t0 which is of modest size.  The problem
here is a large amount of inlined code.

- While this is a synthetic example, meant to stress the
problem, I first experienced the problem on real code.
>How-To-Repeat:
g++ -O choke2.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="choke2.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="choke2.cc"

c3RydWN0IHQwIHsKICBpbnQgYSxiLGMsZCxlLGYsZyxoLGksajsKICB0MCgpIDogYSgxKSxiKDIp
LGMoMyksZCg0KSxlKDUpLAoJIGYoNiksZyg3KSxoKDgpLGkoOSksaigxMCkge30KfTsKCnN0cnVj
dCB0MSB7CiAgdDEoKSB7IHQwIGEsYixjLGQsZSxmLGcsaCxpLGo7IH0KfTsKCnN0cnVjdCB0MiB7
CiAgdDIoKSB7IHQxIGEsYixjLGQsZSxmLGcsaCxpLGo7IH0KfTsKCnN0cnVjdCB0MyB7CiAgdDMo
KSB7IHQyIGEsYixjLGQsZSxmLGcsaCxpLGo7IH0KfTsKCnN0cnVjdCB0NCB7CiAgdDQoKSB7IHQz
IGEsYixjLGQsZSxmLGcsaCxpLGo7IH0KfTsKCnN0cnVjdCB0NSB7CiAgdDUoKSB7IHQ0IGEsYixj
LGQsZSxmLGcsaCxpLGo7IH0KfTsKCgppbnQgbWFpbigpCnsKICB0NSBhMCxiMCxjMCxkMCxlMCxm
MCxnMCxoMCxpMCxqMDsKICB0NSBhMSxiMSxjMSxkMSxlMSxmMSxnMSxoMSxpMSxqMTsKICB0NSBh
MixiMixjMixkMixlMixmMixnMixoMixpMixqMjsKICB0NSBhMyxiMyxjMyxkMyxlMyxmMyxnMyxo
MyxpMyxqMzsKICB0NSBhNCxiNCxjNCxkNCxlNCxmNCxnNCxoNCxpNCxqNDsKfQo=


More information about the Gcc-bugs mailing list