X-POP3-Rcpt: mlehmann AT universe DOT sgh-net DOT de 18 Jan 1998 12:22:48 +0000 (GMT) From: John Hayward-Warburton To: Marc Lehmann , beastium-list AT Desk DOT nl Subject: Virtual memory exhausted during 210 'case' statements In-Reply-To: <19980118023429.57744@cerebro.laendle> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Marc Lehmann Status: RO X-Status: A Content-Length: 1477 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