lua-users home
lua-l archive

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


Hi, Dibyendu Majumdar

>Stack can also be reallocated to reduce or grow as needed.
I want to make Lua meet the soft real-time requirement.
So I do not want to dynamically increase or reduce the stack indeed.

Best Regards
Sunshilong


On Wed, Sep 23, 2020 at 5:34 AM Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
>
> On Tue, 22 Sep 2020 at 08:11, 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
>
>
> > How to comprehend that Lua automatically removes whatever is in the
> > stack below the results after the function returned?
> > How does it achieve this goal?
> > Any explanation or document helps.
> > I would be grateful if you could shed some light on this matter.
> >
>
> Lua's stack is a heap allocated structure. There is a pointer to the
> top of the stack in each Lua State - this is simply reset after a
> function call. Stack can also be reallocated to reduce or grow as
> needed.
>
> Regards