www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/01/18/12:22:48

X-POP3-Rcpt: mlehmann AT universe DOT sgh-net DOT de
18 Jan 1998 12:22:48 +0000 (GMT) :
From: John Hayward-Warburton <linux AT billabong DOT demon DOT co DOT uk>
To: Marc Lehmann <pcg AT goof DOT com>, beastium-list AT Desk DOT nl
Subject: Virtual memory exhausted during 210 'case' statements
In-Reply-To: <19980118023429.57744@cerebro.laendle>
Message-ID: <Pine.LNX.3.96.980118114319.9385A-100000@billabong.demon.co.uk>
MIME-Version: 1.0
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 44

Dear all,

There seems to be a repeatable problem when compiling the recent
pre-0.12 releases of LyX, an editor front-end for the LaTeX/TeX
typesetting system.

The compiler identifies itself as:

pgcc-2.90.23 980102 (egcs-1.0.1 release)

and was compiled as standard, out-of-the-box on this Pentium 233MMX 
running Linux 2.1.80-pre3 with glibc-2.0.6.

The problem is that when compiling the file lyxfunc.C around line
349 (in lyx-0.12.0-pre7), the compiler bombs out with "Virtual
memory exhausted" when any optimisation at all is asked for. Turn
off all optimisation ("-O0") for this file alone, and there is no
problem. It takes a great deal of time for this function to be
compiled, but memory usage is fairly constant until the last couple
of seconds when it whizzes right through the available 82MB on this
system, then bombs out.

The function, for those with access to the source code (it's
downloadable from ftp://ftp.via.ecp.fr/pub/lyx), is distinguished by
the large number (210) of 'case' lines after a 'switch' statement.
So, possibly, it's an optimisation bug brought about by having 210
cases in this function?

If you have the source code, the function begins:

LString LyXFunc::Dispatch(int ac,
                          char const *do_not_use_this_arg)
....

I hope that helps someone. My work-around was to disable
optimisation for this function alone, and the resultant binary works
just fine. 

Yours,

John Hayward-Warburton
linux AT billabong DOT demon DOT co DOT uk


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019