How elua uses memory?

classic Classic list List threaded Threaded
3 messages Options
juani221 juani221
Reply | Threaded
Open this post in threaded view
|

How elua uses memory?

This post has NOT been accepted by the mailing list yet.
Hi! New here in the forum...

Can someone explain to me how elua uses memory? (Stack and heap). What goes to stack and what goes to heap?

(sorry my bad english)

Thank you.
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: How elua uses memory?

This post has NOT been accepted by the mailing list yet.

Hi,

> What goes to stack and what goes to heap?

That is really a philosophical question to me. Stacks can be
implemented in HW on the MCU. Stacking can also be entirely done in
SRAM. That depends on where you're observing memory usage. Are you in
the eLua world writing Lua code on the MCU OR are you in the C world
that implements the (modified) core of Lua for MCUs and all the
marshalling details for eLua?

R
juani221 juani221
Reply | Threaded
Open this post in threaded view
|

Re: How elua uses memory?

This post has NOT been accepted by the mailing list yet.
Thank you for your answer. We're trying to Port eLua to a board, we mapped stack entirely in SRAM. But stack has a strange behavior, we run a script written in Lua that's creates functions and call them and we control stack usage in different parts of the script but stack usage is always the same..

Juan.