lua-users home
lua-l archive

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

Em seg., 9 de nov. de 2020 às 13:04, Francisco Olarte <> escreveu:

On Mon, Nov 9, 2020 at 2:55 PM Ranier Vilela <> wrote:
> I'm surprised that a simple test with very little used memory,
> Lua is already calling realloc!

Why ( are you surprised ) ? ( It may be, and given what I have read in
the manual I suspect is) using realloc for all memory allocations.
AAMOF a quick grep in the sources show no malloc usages and just a
single realloc and free ones ( you can do everything with realloc ).
Including lost the original pointer, if realloc fail.

Ranier Vilela