guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autocompilation support in master


From: Mark H Weaver
Subject: Re: autocompilation support in master
Date: Wed, 10 Jun 2009 00:29:24 -0400

Apologies for sending so many emails in so short a time, but I've put
together the final pieces of this puzzle.

GNU Make 3.81, the version in Debian lenny, sets the stack soft limit
to match the hard limit "so that alloca does not fail".  On my system,
the default stack hard limit is infinite, so Make sets the soft limit
to be infinite as well.

When both the hard and soft limits are infinite, Guile's
init_stack_limit() function in debug.c leaves the internal stack limit
at the initial value of 40000 words, i.e. 160 kilobytes, as set in
eval.c.

On my system, I need somewhere between 384-512 kilobytes to compile
the ecmascript code.  512k succeeds, and 384k fails.

That's all.  Time for sleep now :)

    Mark


> I wrote:
> > > (show-file-name #t stack 40000 debug backtrace depth 100 maxdepth 1000 
> > > frames 3 indent 10 width 79 procnames cheap)
> > 
> > Notice the "stack 40000", which means that the stack limit (as far as
> > guile is concerned) is only 40000 words, i.e. 160 kilobytes.  Other
> > times, I see much larger numbers there, which are close to the actual
> > stack resource limit (as set by setrlimit), and in those cases the
> > stack doesn't overflow.
> 
> It turns out that 40000 is the initial value of guile's internal stack
> limit, as part of the definition of scm_debug_opts[] in eval.c.  That
> value is supposed to be overwritten by init_stack_limit() in debug.c,
> but it will be left unchanged if getrlimit() fails, or if both the
> hard and soft stack limits are set to infinity.
> 
> I suggest increasing the initial value of 40000 to something more
> reasonable, perhaps 128000 words (which is approximately what my
> system needs to successfully compile the ecmascript code), and
> printing an error message if getrlimit fails.
> 
>      Mark
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]