lua-users home
lua-l archive

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


> >Lua relies on the behaviour that the realloc-like function
> >does not return a different pointer (copy) for shrinking an existing
> >block.
>That is not true. Where did you read that?
>From the reply of Stefan.
Thank you for taking the time to respond to me.
I understand it now. Thank you.

BTW, I still have a question.
What are the potential problems if the restriction(l_alloc can't fail
when shrinking the block) can't be guaranteed?

On Wed, Aug 12, 2020 at 3:00 AM Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>
> > >Lua relies on the behaviour that the realloc-like function
> > >does not return a different pointer (copy) for shrinking an existing
> > >block.
>
> That is not true. Where did you read that?
>
> -- Roberto