[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Yielding coroutines from C using coco patch
- From: Hisham <hisham.hm@...>
- Date: Mon, 19 Jan 2009 01:34:17 -0200
On Sun, Jan 18, 2009 at 5:06 PM, Tobias Markmann
> On Sun, Jan 18, 2009 at 6:27 PM, Mike Pall <firstname.lastname@example.org> wrote:
>> It looks like you're using LPeg. The default configuration wastes
>> an awful amount of stack space. Matching some patterns with
>> captures can consume up to 40K of stack space.
>> You seem to be nesting calls to LPeg from capture callbacks. This
>> quickly exceeds the default stack space of 60K for Coco coroutines (*).
>> (*) Lua itself has a rather small stack usage, so 60K is usually
>> more than sufficient.
>> Four solutions:
>> - Either reduce MAXBACK and IMAXCAPTURES in the LPeg sources to
>> some reasonable number,
>> - or increase the default stack size (pass it to lua_newcthread or
>> use luaCOCO_cstacksize),
>> - or don't nest calls to LPeg that deeply,
>> - or don't use LPeg from coroutines.
> Thanks for the hint, seem I was using luarocks, which i can't suggest anyone
> but i started with it and that's it. luarocks somehow requires lpeg it
LuaRocks does not require lpeg.
> Now I turned it off i don't get that error anymore.
Which one did you turn off, luarocks or lpeg?