Hi -It's not eLua that adds the requirement for dynamic memory allocation, Lua itself requires and makes extensive use of dynamic memory allocation. Lua runs all the dynamic memory management through realloc (since it can basically perform all the functions of malloc/realloc/free with just realloc). If you only have malloc and free you can work around implementing realloc functionality:Lua will allocate memory for buffers to store your script in when you compile it, it will have to allocate memory to store the resulting bytecode and it will have to allocate memory for variables/functions/etc.. that are created and assigned as you go along. Even if the variable assignment you do doesn't require a new allocation it's using Lua's stack which is dynamically allocated. You might be doing things in Lua that look like what would be stack allocations in C, but in the Lua VM it's using dynamic memory allocationYou certainly don't need an MMU (most of our targets don't have one). Is there a reason why you might not be able to set aside a heap for Lua and point an existing malloc implementation at it (like the dlmalloc included with eLua)?On Tue, May 20, 2014 at 8:32 AM, billson555 <[hidden email]> wrote:
Just to clarify:--
We were intending on sending Lua script over some yet un-chosen connection
protocol to run some tests on our hardware. Are you saying that it would be
impossible to run eLua without dynamic memory allocation, even if our Lua
script tests didn't use any dynamic memory allocation?
I just want to be as sure as I can before I have to make any dramatic shifts
in strategy.
Thank you
View this message in context: http://elua-development.2368040.n2.nabble.com/PowerPC-port-for-company-tp7578410p7578416.html[hidden email]
Sent from the eLua Development mailing list archive at Nabble.com.
_______________________________________________
eLua-dev mailing list
https://lists.berlios.de/mailman/listinfo/elua-dev
--James Snyder
ph: <a href="tel:%28847%29%20448-0386" value="+18474480386" target="_blank">(847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Free forum by Nabble | Edit this page |