Max. Upvalues

classic Classic list List threaded Threaded
4 messages Options
Stefan Brantschen-3 Stefan Brantschen-3
Reply | Threaded
Open this post in threaded view
|

Max. Upvalues

Hi

I ran into the error message that I have more that 10 upvalues for function. I checked the conf file and saw that this is configurable. Standard Lua is set to maximally 60 upvalues. Is this reduced for eLua for memory restriction reasons? Is there a specific reason that the limit is 10, and not, say, 20?

Thanks.

Cheers
-- Stefan

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Max. Upvalues

Hi,

Yes, it is reduced by eLua to save RAM. You can increase it to 20 in luaconf.h (I think). No specific reason for which it is 10, just seemed like a good value at the time. Although now I agree that 10 is way too low.

Best,
Bogdan

On Tue, Jun 22, 2010 at 2:45 PM, Stefan Brantschen <[hidden email]> wrote:
Hi

I ran into the error message that I have more that 10 upvalues for function. I checked the conf file and saw that this is configurable. Standard Lua is set to maximally 60 upvalues. Is this reduced for eLua for memory restriction reasons? Is there a specific reason that the limit is 10, and not, say, 20?

Thanks.

Cheers
-- Stefan

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Stefan Brantschen-3 Stefan Brantschen-3
Reply | Threaded
Open this post in threaded view
|

Re: Max. Upvalues

Hi

On 22 Jun 2010, at 14:00, Bogdan Marinescu wrote:

> Yes, it is reduced by eLua to save RAM. You can increase it to 20 in luaconf.h (I think). No specific reason for which it is 10, just seemed like a good value at the time. Although now I agree that 10 is way too low.

Thanks. So what about raising the value to 20 then for the standard? ^^

Cheers
-- Stefan

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: Max. Upvalues



On Tue, Jun 22, 2010 at 10:27, Stefan Brantschen <[hidden email]> wrote:


Thanks. So what about raising the value to 20 then for the standard? ^^

We've never had problems with the current 10 but you may be right, it may be too low and we're likely to have more ram on the chips to come :)
Can you tell a bit more about the app or function that caused this error ? Does it look too different or specialized ? Changing it to 20 will solve your problem or you would still need more for this app ?

Just edit the (now) line 499 in src/lua/luaconf.h

#define LUAI_MAXUPVALUES        10

Cheers
-- Stefan

Cheers
Dado





 

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev